octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #41699] imformats causes a segmentation fault


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #41699] imformats causes a segmentation fault on Windows when Octave exits
Date: Thu, 26 Feb 2015 04:50:35 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36

Follow-up Comment #85, bug #41699 (project octave):

Ok, here is a minimum working example that exhibits the segmentation fault
when Octave exits.


function formats = whatever ()
  persistent formats = struct ( "coder", {},
                                "ext", {},
                                "isa", {},
                                "info", {},
                                "read", {},
                                "write", {},
                                "alpha", {},
                                "description", {},
                                "multipage", {});
  formats(1).coder = "CUR";
  formats = __magick_formats__ (formats);
endfunction


I was originally testing with "PNG" as the only format, but it did not
segfault. Using "CUR" or "ICO" as the only format does segfault. So going back
to the original imformats.m, commenting out both "CUR" and "ICO" no longer
segfaults.

Is there something about these two formats in GraphicsMagick on Windows that
would cause this segmentation fault or is it just random coincidence that it
happens for me only with these two? Can someone else verify that commenting
out these two formats in imformats.m fixes the segfault on exit?

So the combination of things that are required to cause the segfault for me
are

* persistent struct array in a function
* copying the return value from the oct-file function __magick_formats__ into
the persistent struct array
* using the "CUR" or "ICO" image formats

If the struct array is not persistent, no segfault. If neither of those
formats is passed into GM, no segfault. If the return value of
__magick_formats__ is not assigned back into the struct array, no segfault.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41699>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]