Skip to content

Commit 1a5e1c3

Browse files
committed
I think this fixes SEGV on weak-hashtable-set!
1 parent 0a9798f commit 1a5e1c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/weak.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ static void weak_hashtable_create_entry(SgHashCore *core, SgHashEntry *e)
511511
{
512512
SgObject table = SG_OBJ(core->data);
513513
if (SG_WEAK_HASHTABLE_WEAKNESS(table) & SG_WEAK_KEY) {
514-
SgObject key = SG_OBJ(e->key);
514+
volatile SgObject key = SG_OBJ(e->key);
515515
e->key = (intptr_t)Sg_MakeWeakBox(key);
516516
/* needed for managing entryCount... */
517517
Sg_RegisterFinalizer(key, key_finalizer, table);

0 commit comments

Comments
 (0)