setjmp/longmp
DAVID DYER-BENNET MRO1-2/L14 DTN 231-4076
ddb at mrvax.DEC
Sat Nov 3 07:16:58 AEST 1984
Saving all registers at the time of the setjmp, and restoring them at
the time of the longjmp, is not sufficient to ensure that all accessible
variables have their setjmp-time values restored after the longjmp.
Stack variables will have whatever their last set value was. Furthermore,
since there is no way to tell which variables are living where AT THE TIME
OF THE SETJMP (or at any other time), it is thus impossible to determine
which variables have which values after a setjmp reached by a longjmp.
This behavior makes setjmp/longjmp completely useless.
-- David Dyer-Bennet
-- ...decwrl!dec-rhea!dec-mrvax!ddb
More information about the Comp.lang.c
mailing list