bugGNU Octave - Bugs: bug #35229, imread (read_images) fails when...

 
 

bug #35229: imread (read_images) fails when QuantumDepth is 32

Submitted by:  None
Submitted on:  Tue 03 Jan 2012 06:53:27 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: FixedAssigned to: None
Originator Name: Bernard KozioziemskiOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.4.3
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.

 

Mon 09 Jan 2012 03:00:48 AM UTC, comment #4:

Fixed in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/47a5e29ecc0b). The fix will be part of the 3.6.0 release expected within a week or so.

Rik <rik5>
Project Administrator
Mon 09 Jan 2012 01:43:14 AM UTC, comment #3:

Thanks for checking this. You're correct. Your method looks cleaner (I'm not a skilled programmer). Changing the denominator makes sense too.

Anonymous
Mon 09 Jan 2012 01:38:14 AM UTC, comment #2:

Could you test the attached patch (magick.patch)? If it works I can get it into the upcoming 3.6.0 release quickly.

(file #24769)

Rik <rik5>
Project Administrator
Mon 09 Jan 2012 12:40:07 AM UTC, comment #1:

I agree that this looks like a problem. I have two questions.

Question 1: Is there any reason not to use a long long literal instead of casting?

Question 2: You changed only the numerator. Shouldn't the denominator also be changed?

Rik <rik5>
Project Administrator
Tue 03 Jan 2012 06:53:27 PM UTC, original submission:

in _magick_read_.cc, I found the following bug. I was getting crashes with floating point exception (division by zero) when attempting to read a grayscale image. I traced the problem to line 215 in src/DLD-FUNCTIONS/__magick_read__.cc

When graphicsmagick has been compiled with QuantumDepth=32, divisor is always zero as 1 is implicitly assumed to be a 32 bit integer. I made the following change:

This casts '1' to a long long int, allowing the 32 bit shift.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #24769:  magick.patch added by rik5 (751B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 09 Jan 2012 03:00:48 AM UTCrik5StatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
    Mon 09 Jan 2012 01:38:14 AM UTCrik5Attached File-=>Added magick.patch, #24769
    Mon 09 Jan 2012 12:40:07 AM UTCrik5StatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1