[Gs-devel] help with 128-bit alignment issue (sf bug # 502866)

rillian rillian at telus.net
Mon Jan 14 19:28:34 PST 2002


I need some help with sf bug #502866 aka http://bugs.debian.org/128314

The basic issue seems to be that on ia64, setjmp() requires the passed 
jmpbuf to be 128-bit aligned. We keep a jmpbuf in the jpeg_stream_data 
struct for error recovery from the jpeg library, and I guess the gs 
allocator doesn't know about the alignment requirements of that 
particular element. It looks to me like the other uses don't have this 
problem. In gdevpng.c, it's malloc'd by libpng, so at least not our 
problem. Also, a jmpbuf is referenced in client storage from the dll 
implementation.

The debian folk determined that forcing obj_align_mod to 16 resolved the 
issue. Obviously having genarch.c look for something like this and 
adding another requirement to the mask is a more appropriate fix than 
their #ifdef patch, but I wondered if someone more familiar with the 
memory allocator had any other ideas.

I assume the memory penalty for forcing 16-byte alignment is noticible, 
but not prohibitive. We use this mostly for error recovery from the png 
and jpeg libraries.

  -r




More information about the gs-devel mailing list