- generic/nsfStack.c / CallStackPopAll(): When cleaning up the unstacked CSC entries, the borderline case of just 1 CSC entry led to a d…
Show more
- generic/nsfStack.c / CallStackPopAll(): When cleaning up the unstacked CSC entries, the borderline case of just 1 CSC entry led to a dangling pointer (and so a crash). This was caused by the unhandled side effect of CscListRemove() (or, rather, NsfClassListUnlink()) which updates the interp's cscList pointer in the 1-list-entry scenario. By using a copy of this pointer in the cleanup loop, this scoped pointer became dangling. To reproduce the issue (prior to this commit), run for example:
Object create o { exit -1 }
I extended the CscListRemove() interface for a conditional out
parameter, to be used for tracking changes to the interp's cscList
pointer.
- generic/nsf.c: Modified the occurrences of CscListRemove() to
reflect its extended interface.
- generic/nsfStack.c: Extended the documentation snippets of the