bug in solutions?

Peter Schachte pets at cs.mu.oz.au
Fri Mar 21 09:37:08 AEDT 1997


In looking at the code for solutions in non-GC grades, I noticed this
code (comments trimmed):

	Word *temp_hp = hp;
	hp = (Word) solutions_heap_pointer;
	save_transient_registers();
	r3 = deep_copy(r1, (Word *) type_info_fv, (Word *) saved_hp_fv, 
		heap_zone->top);
	restore_transient_registers();
	list_fv = list_cons(r3, list_fv);
	solutions_heap_pointer = (Word *) hp;
	hp = temp_hp;


If the solutions heap should overflow during the deep_copy in a grade
with a non-conservative garbage collector, wouldn't we be in
deep_dodo?  hp points one place, and heap_zone's fields point
somewhere else entirely.


-Peter Schachte      URL:  http://www.cs.mu.oz.au/~pets/
pets at cs.mu.OZ.AU     PGP:  finger pets at 128.250.37.150 for key
    [A computer is] like an Old Testament god, with a lot of rules
    and no mercy.  -- Joseph Campbell




More information about the developers mailing list