[nos-bbs] JNOS (any NOS) and Fedora Core 5 - the bottom line.
maiko at pcs.mb.ca
maiko at pcs.mb.ca
Sun May 28 22:52:57 EDT 2006
Greetings all,
For the fun of it - I had time to pass at work - I took a look
at compiling JNOS for Fedora Core 5 a few days ago, and I did
some research on the results.
The bottom line is that the jmp_buf mechanism will no longer be
able to be used, and will have to be replaced with the context
mechanism instead. In other words, setjmp/longjmp will have to
be replaced with setcontext/getcontext, or something along that
line. This may not be as difficult as it seems, since I see old
references to the 'context' method in the code. It was specific
to the SUN platform. I've been able to compile a version using
this method, but have yet to get it to run with out a crash.
In FC5 and other systems that use the particular GLIBC, the
pointer returned by the longjmp() call is apparently mangled
now (for security, buffer overflow hack protection, etc), so
the value initially set by the setjmp() call, will return as
a completely differently value when longjmp() is called, and
of course a crash will result.
There is apparently some ASM code that one can imbed in the
source to get around this, and continue using setjmp/longjmp,
but it looks very tricky, and is very platform dependent. The
only example I found (so far) is not very clear to follow :-(
Regards,
Maiko Langelaar / VE4KLM
More information about the nos-bbs
mailing list