[Insight-users] Very strange crashing bug with JPEG input

Brad King brad.king at kitware.com
Wed, 18 Feb 2004 09:27:30 -0500


Zachary Pincus wrote:
> Hello all,
> 
> After a lot of debugging, I think I have isolated a crashing bug in  
> ITK's JPEG reader.
> 
> SUMARRY: If you try create a new ImageFileReader and use the new reader  
> to read in a JPEG more than 84 times, the program crashes. The specific  
> file being read doesn't matter -- what's important is that the  
> ImageFileReader is created, passed a jpeg file name, Update()'d and  
> deleted more than 84 times.
> 
> Interestingly, if the program that does this is run within GDB, there  
> is no error until after 3411 repeats of the same.
> 
> This points to a subtle buffer overflow in some shared memory region.  
> When GDB is running, memory is laid out differently, so it takes longer  
> for some overflows to manifest themselves (I think).
> 
> DETAILS: I'm using a CVS checkout of ITK from Sunday. There weren't any  
> major purify errors that day, that I noticed. I'm running on OS X  10.3.2.

Was this ITK built with "ITK_USE_SYSTEM_JPEG" set to ON or OFF?

-Brad