[sldev] [VWR] OpenJPEG backtraces
Callum Lerwick
seg at haxxed.com
Tue Sep 25 13:55:19 PDT 2007
On Sat, 2007-09-22 at 10:34 +0100, Robin Cornelius wrote:
> 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 ) ) ;
Comcast decided to change the IP of the server running my domain without
really warning us, long story short, this thread only just got through
to me.
I was unaware this code was causing an actual bug, though usually I'm
running with the DWT vectorization patch, which happens to fix it. :)
My patch that adds an opj_aligned_malloc() to do aligned allocations
with was merged a bit ago, but I overlooked the DWT. Patching the DWT to
use opj_aligned_malloc() is in with the DWT vectorization patch, which
has not got merged yet.
I can separate that out into its own patch, and probably get it merged
right away. Upstream was asking me about that bit of code. :)
Though really, all you need to do is eliminate the pointer mangling
entirely and go with a plain malloc. On Linux x86_64, all heap
allocations are already 16 byte aligned. On i386, or anything else,
alignment shouldn't be strictly required because the vectorization patch
hasn't been merged. :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.secondlife.com/pipermail/sldev/attachments/20070925/ca49b57f/attachment.pgp
More information about the SLDev
mailing list