Added big TODO based on maze benchmark crashes (!!)

This commit is contained in:
Justin Ethier 2020-02-03 10:21:13 -05:00
parent 9d2d8c014c
commit 6ad04ddb3d

View file

@ -2188,6 +2188,12 @@ object Cyc_set_car_cps(void *data, object cont, object l, object val)
val = transport_stack_value(data, l, val, &do_gc); val = transport_stack_value(data, l, val, &do_gc);
gc_mut_update((gc_thread_data *) data, car(l), val); gc_mut_update((gc_thread_data *) data, car(l), val);
TODO: is there a race condition here between the collector (potentially with a stack value here) and the mutator (which is doing GC next?)
maybe we need to wait until after gc is finished before doing the actual mutation. that implies we need to create another continuation (that will do the mutation) and
return to there from GC.
NOTE set-cdr and vector-set are also affected. probably global_set too
once this change is made need to retest maze benchmark extensively in particular (as it was crashing previously) as well as entire suite. need to make sure this is
rock solid before it goes back to master
car(l) = val; car(l) = val;
add_mutation(data, l, -1, val); // Ensure val is transported add_mutation(data, l, -1, val); // Ensure val is transported
if (do_gc) { if (do_gc) {