summaryrefslogtreecommitdiffstats
path: root/socket.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-04-11 21:30:19 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-04-11 21:30:19 -0700
commit46a4099f9fedf89d1a8cc45cf566750ab7284863 (patch)
tree7b6d540d10c3e014d486e645fcb73a3bd65c9603 /socket.h
parent313f2a76069064fa2262e4aec5526a30c2fba047 (diff)
downloadtxr-46a4099f9fedf89d1a8cc45cf566750ab7284863.tar.gz
txr-46a4099f9fedf89d1a8cc45cf566750ab7284863.tar.bz2
txr-46a4099f9fedf89d1a8cc45cf566750ab7284863.zip
Harden glob: continuations, exceptions, re-entry.
* glob.c (s_exit_point): New static variable. (errfunc_thunk): Set up a continuation guard frame, so the error function cannot capture a continuation across glob's stack frames. Intercept all unwinding with a simple unwind block, save the exit point in the global variable and then stop the unwinding by setting the unwind frame's exit point to null. (glob_wrap): Check for glob being re-entered and throw error if so. If the glob callback bailed due to unwinding (as seen by a non-null value in the exit point global variable), clean up the glob memory with globfree and continue the unwinding to the exit point. unwind.h (uw_curr_exit_point): New macro for accessing saved exit point in pure unwind frame.
Diffstat (limited to 'socket.h')
0 files changed, 0 insertions, 0 deletions