Skip to content
Browse files

Check type before GC a struct

The old logic works because Make_Mem clears all newly allocated memory
before. With uninitialized memory, a simple checking for (spec == NULL)
is not reliable.
  • Loading branch information...
zsx committed Jul 27, 2015
1 parent 753873f commit 3fa82bb913466b0684284683aacf0d20c038fc20
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/m-gc.c
@@ -234,7 +234,7 @@ static void Mark_Value(REBVAL *val, REBCNT depth);
if (ROUTINE_LIB(rot) != NULL) { //this could be null it's called before the routine! has been fully constructed
if (ROUTINE_RVALUE(rot).spec) {
Mark_Struct(&ROUTINE_RVALUE(rot), depth);

0 comments on commit 3fa82bb

Please sign in to comment.
You can’t perform that action at this time.