Around 18 o'clock on Feb 20, Egbert Eich wrote:

> However this doesn't work too well in freetype. jmp_bufs are
> part of larger structs. Converting this not totally trivial.

I think it's more practical to simply make the jmp_buf "big enough"; 
forcing the library to restructure itself to permit dynamic allocation of 
jmp_buf will probably introduce more bugs that we won't easily detect.

Because the libc wrapper module is compiled with knowledge about the local 
library, we can easily put in a compile-time check to make sure the 
xf86jmp_buf is large enough for the native setjmp/longjmp implementation 
on each host that runs XFree86:

        char    check_jmpbuf[sizeof(xf86jmp_buf) - sizeof(jmp_buf)];

This code will fail to compile if xf86jmp_buf is smaller than jmp_buf.  
Stick this in a separate file so it doesn't get linked into the server 
image and XFree86 won't build on a machine that needs more jmp_buf space.  
Fixing this would require redefining the jmp_buf size and rebuilding all 
of the modules that use setjmp making that machine incompatible with 
binaries built for other machines with the same CPU.

-keith


_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to