summaryrefslogtreecommitdiffstats
path: root/signal.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-05-01 06:26:35 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-05-01 06:26:35 -0700
commite87977d7d5a30f5de607bf465091ed17c0ab1ef2 (patch)
treeb70f958c19f001c89bdc923e1a8ba7d207706f43 /signal.h
parent37c08311602c95f7f2f0fb40d33783c78a3b0d62 (diff)
downloadtxr-e87977d7d5a30f5de607bf465091ed17c0ab1ef2.tar.gz
txr-e87977d7d5a30f5de607bf465091ed17c0ab1ef2.tar.bz2
txr-e87977d7d5a30f5de607bf465091ed17c0ab1ef2.zip
Fix corruption triggered by extended gc disabling.
The issue is that when gc is disabled, the gc function does nothing. But various code depends on calls to gc() doing something, like making space available in various static arrays. When gc is disabled for long periods, there are issues, like array overruns. * gc.c (gc): Must no longer be called at all if gc_enabled is false, and asserts that it is true. Callers must check the gc_enabled flag and implement appropriate cases. (make_obj): Only call gc when gc_enabled is true. If there is no space in the freshobj array after trying gc, or gc couldn't be tried because it is disabled, then schedule a full gc. (gc_set): If the checkobj array is full, only call gc if gc is enabled, otherwise schedule a full_gc. (gc_mutated): Do not assume that the mutobj array has room for another object; only set the object's generation to -1 and put it into the array if there is room. Similarly to gc_set, do a gc if there is no room, but if gc is not enabled, then schedule a full gc. (gc_wrap): Only call gc if gc_enabled is true, and return t in that case rathe than nil. * txr.1: Document return value of sys:gc function.
Diffstat (limited to 'signal.h')
0 files changed, 0 insertions, 0 deletions