forked from rebolsource/r3
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ATRONIX: Fix: Restore Saved_State/Halt_State when a longjmp happens
Fixes: Oldes/Rebol-issues#2190 Illustrated by: ``` attempt [; this sets Saved_State catch/quit [ ;this calls Try_Block_Halt and sets Halt_State print x ; this causes an error, and calls ;"longjmp(*State_State)", which invalidates ; Halt_State above. ] ] load %./ ;Just tries to fill up the C stack and messes up "Halt_State". halt ; Jumps to the invalid "Halt_State", and crashes ``` or ``` catch/quit [ ;sets Halt_State attempt [ ;sets Saved_State quit ; jumps to Halt_State, and invalidates "Saved_State" ] ] print x ; Causes a jump to the invalid "Saved_State" ``` (cherry picked from commit 91b4fbd)
- Loading branch information
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters