Skip to content

Commit

Permalink
FIX: crash when used bind on recursive data
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Apr 17, 2024
1 parent cfe4ffc commit ddad4bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/c-frame.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,8 @@
REBCNT n;
REBFLG selfish = !IS_SELFLESS(frame);

CHECK_STACK(&n);

for (; NOT_END(value); value++) {
if (ANY_WORD(value)) {
//Print("Word: %s", Get_Sym_Name(VAL_WORD_CANON(value)));
Expand Down
7 changes: 7 additions & 0 deletions src/tests/units/crash-test.r3
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,13 @@ foreach [n s] system/schemes [
;@@ https://github.com/Oldes/Rebol-issues/issues/767
--assert same? :greater? copy :greater? ;-no crash

--test-- "recursive bind"
;@@ https://github.com/Oldes/Rebol-issues/issues/2278
obj: make object! [x: 10]
blk: copy [x]
append/only blk blk
--assert all [error? e: try [bind block obj] e/id = 'stack-overflow]

===end-group===

~~~end-file~~~

0 comments on commit ddad4bb

Please sign in to comment.