longjmp question

Ron 603-884-2088 brender at gemgrp.zko.dec.com
Thu Sep 9 14:31:09 UTC 1999


>Anecdotal evidence is that such implementations are rare, and
>that they break code that, while technically nonconforming,
>does work with the more common sort of setjmp.

Not rare at all, I think. In addition to the systems already mentioned by
others, these systems also do exception-handling compatible unwinding
for C's setjmp/longjmp:

    VMS/VAX and VMS/Alpha
    Tru64 Unix/Alpha [not originally, but at least as of V4]

    Microsoft Visual C on W95&WNT/IA64
       [to support SEH (structured exception handling) extensions]
    Microsoft Visual C on WNT/Alpha (RIP)
       [to support SEH]

If you believe in safe and compatible multi-language systems, there really
is no choice but to do EH compatible unwinding for setjmp/longjmp -- at
least by default.

I suppose it would be OK for an implementation to offer an alternate
setjmp/longjmp that could be linked in for those who either know that it is
safe in particular cases or are happy to trade safety for speed...

--Ron




More information about the cxx-abi-dev mailing list