bugGNU Octave - Bugs: bug #55397, test imwrite error with address...

 
 

bug #55397: test imwrite error with address sanitizer

Submitted by:  Dmitri A. Sergatskov <dasergatskov>
Submitted on:  Sat 05 Jan 2019 06:25:43 PM UTC  
 
Category:  Test Suite Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Works For Me Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  5.0.1 Operating System:  GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Sat 19 Jan 2019 12:22:40 AM UTC, comment #14:

Thanks. I'm pretty sure this is an upstream bug at this point. ASAN identifies the leak in Magick library when the exception about a bad format is attempted to be thrown

Rik <rik5>
Project Administrator
Fri 18 Jan 2019 11:32:33 PM UTC, comment #13:

Do not see any change:

Here is what I did to

../libinterp/corefcn/__magick_read__.cc

Dmitri A. Sergatskov <dasergatskov>
Fri 18 Jan 2019 10:42:12 PM UTC, comment #12:

I think the problem may be the exception handling. The code in _magick_read_.cc is

@Dmitri: Could you try commenting out all of the catch blocks, re-compiling, and then testing with

Rik <rik5>
Project Administrator
Tue 08 Jan 2019 06:06:04 AM UTC, comment #11:

Still the same. Do not see any change.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Tue 08 Jan 2019 12:38:42 AM UTC, comment #10:

I doubt it will fix the issue, but I just checked in a fix for a static analyzer detected issue with _magick_read_.cc which might be relevant (https://hg.savannah.gnu.org/hgweb/octave/rev/72e0a106d956).

Rik <rik5>
Project Administrator
Mon 07 Jan 2019 02:17:52 AM UTC, comment #9:

I tried to compile with ASAN convert.c example program
http://www.graphicsmagick.org/api/api.html

and I do not see any problem with it.
So perhaps it is still octave problem...

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Mon 07 Jan 2019 01:48:45 AM UTC, comment #8:

Might be due to:

http://www.graphicsmagick.org/Changelog.html

2018-11-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>

magick/constitute.c (WriteImage): Eliminate use of just-freed memory in clone_info->magick when throwing exception due to no support for format. Fixes SourceForge issue #576 "heap use-after-freee when convert one format into another format".

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Mon 07 Jan 2019 01:41:32 AM UTC, comment #7:

So 1.3.30 is also OK but 1.3.31 crashes.

Dmitri.

Dmitri A. Sergatskov <dasergatskov>
Mon 07 Jan 2019 01:36:14 AM UTC, comment #6:

I downgraded to 1.3.28 and the problem gone away.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Mon 07 Jan 2019 01:28:36 AM UTC, comment #5:

I also have GraphicsMagick, and I checked the config log and I am using it over ImageMagick.

Rik <rik5>
Project Administrator
Sun 06 Jan 2019 09:40:29 PM UTC, comment #4:

So you are using ImageMagick I thought we preferred GraphicsMagick
(I am using GraphicsMagick-1.3.31-2.fc29.x86_64).

But it does appear to be a bug in GraphicsMagick; it cannot handle
wrong input...

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sun 06 Jan 2019 09:05:02 PM UTC, comment #3:

This works for me. I get

This is with

Rik <rik5>
Project Administrator
Sun 06 Jan 2019 07:26:05 PM UTC, comment #2:

The test that causing ASAN to crash is
imwrite (1, "filename", "junk"):

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sat 05 Jan 2019 06:41:11 PM UTC, comment #1:

Here is the same test with a minimal octave (no qt, no java):

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sat 05 Jan 2019 06:25:43 PM UTC, original submission:

After compiling aced09cc1721 (stable) tip (5.0.1) with address sanitizer flags. Running under gdb:

ASAN_OPTIONS=verbosity=0:leak_check_at_exit=0 ./run-octave -g -q -f

Perhaps it is false positive. Will retest w/o Qt.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by dasergatskov (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-19 rik5 Open/ClosedOpen => Closed
    2019-01-06 rik5 StatusNone => Works For Me

    Back to the top


    Powered by Savane 3.4