NULLSTACK fixes for nonlocal exits in reentrant pre-wind handlers
authorAndy Wingo <wingo@pobox.com>
Thu, 9 Oct 2008 12:44:43 +0000 (14:44 +0200)
committerAndy Wingo <wingo@pobox.com>
Thu, 9 Oct 2008 12:44:43 +0000 (14:44 +0200)
commit66db076ae17e1a6b5225fabaaeb6958115cc9b4c
treea2390479cac342ab6de5d38aa9492648afe74f16
parent0570c3f197f910cc136969d6a2ed2ad0792b3501
NULLSTACK fixes for nonlocal exits in reentrant pre-wind handlers

* libguile/vm-i-system.c (goto/cc): Add some asserts here.

* libguile/vm.c (capture_vm_cont): Add some asserts here too.
  (reinstate_vm_cont): Null the correct number of bytes. Add a FIXME.
  (vm_reset_stack): Make the code a bit clearer. Null the correct number
  of bytes.

* libguile/vm-engine.h (NULLSTACK_FOR_NONLOCAL_EXIT): New macro, handles
  a very tricky case that took me days to find! Amply commented. Expands
  to nothing in the normal case.

* libguile/vm-i-system.c (call, goto/args, mv-call): Call
  NULLSTACK_FOR_NONLOCAL_EXIT in the right places. Fixes
  continuations.test.
libguile/vm-engine.h
libguile/vm-i-system.c
libguile/vm.c