X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=doc%2Finternals%2Fspecials.texinfo;h=96e9afc19d47235cc749911aaea5d4d08519bdd6;hb=746c4003dd76ea67647c87176e4c818f512d59b7;hp=036851e0d17bf6000b5d3a6d21a26cb6cb3b4105;hpb=af4d83b57531e98d455f31980ef6359465d3d5a7;p=sbcl.git diff --git a/doc/internals/specials.texinfo b/doc/internals/specials.texinfo index 036851e..96e9afc 100644 --- a/doc/internals/specials.texinfo +++ b/doc/internals/specials.texinfo @@ -52,4 +52,13 @@ garbage pointer. Furthermore, @code{BIND} must always write the value to the binding stack first and the symbol second because the symbol being non-zero -means validity to @code{UNBIND-TO-HERE}. +means validity to @code{UNBIND-TO-HERE}. For similar reasons +@code{UNBIND} also zeroes the symbol first. But if it is interrupted +by a signal that does an async unwind then @code{UNBIND-TO-HERE} can +be triggered when the symbol is zeroed but the value is not. In this +case @code{UNBIND-TO-HERE} must zero out the value to avoid leaving +garbage around that may wreck the ship on the next @code{BIND}. + +In other words, the invariant is that the binding stack above bsp only +contains zeros. This makes @code{BIND} safe in face of gc triggered at +any point during its execution.