[sldev] [VWR] OpenJPEG backtraces

Dzonatas dzonatas at dzonux.net
Sat Sep 22 07:50:48 PDT 2007


Robin Cornelius wrote:
> 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.
>
>

This sucks because it means there are cases were "unsigned" doesn't 
follow the standard, which "unsigned" (without "int" or "long") should 
be automatically 32 or 64 bit based on the the machine. Fudge... Toss it...

We'll have to use _mm_alloc() or like where it is defined correctly in 
the headers. I think Callum already changed it to use such in a patch.

-- 
Power to Change the Void


More information about the SLDev mailing list