[Tiff] Re: [gdal-dev] Problem with libTiff on Solaris 10

Dan Greve grevedan at hotmail.com
Fri May 30 19:53:49 EDT 2008


>Many compilers will produce a warning if an action is performed in a >way which does not assure correct alignment.
 
I know GCC was throwing a number of warnings in the libtiff directory,maybe i'll actual pay attention to these in the next rebuild :)
 
>I've done a quick 'grep "*(int32*)" *.c ' and 'grep "*(uint32*)" *.c' on >libtiff 3.8.2 sources and libtiff 4.0.0 sources, and found much more of those >in the later than in the former, so it is a hint that this may be the >problem. Bodes well that there is a greater likelihood this error would occur in libtiff 4.0.0(if this is what is included in gdal-1.5.1). I'm time crunched, so i think i'll try toto go in and replace the direct memory accesses with the TiffMemcpy like Evansuggested.
 
>Anyway, we could be sure of the reason if Dan could print the value of the n >pointer when the debugger stops on the crash. And I think that 'sigbus' is >more typical of alignment problems. A null pointer would have given >a 'sigsegv' I think.
I'll forward the output of the n pointer from gdb, but I'm pretty sure it was notnull.  But even though the console output was "bus error", i think the debuggerwas segsegv, but will verify this in the morning.  Unfortunately, due to the classification of this machine, I may not be able to provide a stack traceeasily.
Thanks ya'll for the great inputs.
-- Dan Greve-- Software Engineer-- Northrop Grumman Corp.



> Date: Fri, 30 May 2008 15:58:02 -0500> From: bfriesen at simple.dallas.tx.us> To: even.rouault at mines-paris.org> CC: andy.cave at hamillroad.com; gdal-dev at lists.osgeo.org; grevedan at hotmail.com; tiff at lists.maptools.org; Shawn.Gong at drdc-rddc.gc.ca> Subject: Re: [Tiff] Re: [gdal-dev] Problem with libTiff on Solaris 10> > On Fri, 30 May 2008, Even Rouault wrote:> >> > Related topic, do people know if there's a Valgrind option/patch that could> > help us to detect that ? I looked a bit but couldn't find one. I imagine> > that's it's "easy" for Valgrind to detect and report such unaligned memory> > accesses. That could enable people not having the "chance" of getting access> > to a SPARC platform to anticipate such problems even with i386 hardware.> > Many compilers will produce a warning if an action is performed in a > way which does not assure correct alignment.> > The popular targets for valgrind do not seem to care about aligned > access, or perhaps unaligned access is just a bit slower.> > I have access to SPARC here so if someone can formulate a simple way > to re-create the problem without GDAL installed then I should be able > to help debug the issue.> > Bob> ======================================> Bob Friesenhahn> bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/> GraphicsMagick Maintainer, http://www.GraphicsMagick.org/> 
_________________________________________________________________
Make every e-mail and IM count. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ MakeCount
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080530/0d56895a/attachment.html


More information about the gdal-dev mailing list