[sldev] [VWR] OpenJPEG backtraces
Robin Cornelius
robin.cornelius at gmail.com
Sat Sep 22 02:34:26 PDT 2007
Robin Cornelius wrote:
>
> (gdb) bt
> #0 0x0000000001dcb476 in dwt_interleave_h (h=0x41801b90, a=0xff6a0f0)
> at libopenjpeg/dwt.c:166
> #1 0x0000000001dcdfaf in dwt_decode_tile (tilec=0x845ede0, stop=0,
Looking at frame #1 i've found the problem
in dwt.c line 623 we have pointer truncation
h.mem = v.mem = (int*)( (unsigned)m + 16 - ( (unsigned)m % 16 ) ) ;
I've checked the contents of h and m using the gdb console and with the
(unsigned) cast you get a bogus memory location and with a (unsigned
long) cast you get the intended memory location
64bit systems only
I'm not sure what the correct portable correct version is to make a
patch thats good for 32 and 64 systems.
Robin
More information about the SLDev
mailing list