diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-04-11 12:28:18 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-04-11 12:28:18 -0700 |
commit | db3011bf955768f3f0a9411b2f9782b1290c950d (patch) | |
tree | 556a1c8574cb7d0bb86a42a0478a54aaad3c49f5 /gc.c | |
parent | 3cffd5639fc0d1484a543c0bc137b8e00205a9e9 (diff) | |
download | txr-db3011bf955768f3f0a9411b2f9782b1290c950d.tar.gz txr-db3011bf955768f3f0a9411b2f9782b1290c950d.tar.bz2 txr-db3011bf955768f3f0a9411b2f9782b1290c950d.zip |
gc: sys:gc function must not reset full_gc flag.
* gc.c (gc_wrap): We must not set full_gc according to the
argument, but only set it to 1 if the argument requests
full GC. full_gc is set to 1 for some reason having to do with
correctness; only the garbage collector can reset full_gc
back to 0, otherwise incorrect behavior will ensue.
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -974,7 +974,8 @@ static val gc_wrap(val full) { if (gc_enabled) { #if CONFIG_GEN_GC - full_gc = !null_or_missing_p(full); + if (!null_or_missing_p(full)) + full_gc = 1; #endif gc(); return t; |