Comment 10 for bug 2009331

Revision history for this message
Douglas Katzman (dougk) wrote :

> The lesson seems to be [...]
right

> 1. Do you know the safe operations that can be performed on an error object that has a dynamic-extent
technically, no operation accessing the dynamic-extent value in a slot out-of-extent is safe. Printing via ~S does not call the print-object method, so it mostly works.
DESCRIBE is not guaranteed safe - everything is "best effort" in terms of detecting trashed objects during printing. People ask this all the time as in "why can't you detect clobbered objects".
Any attempt to insert code to do so would totally outweigh any gain from using dynamic-extent. i.e. automatic lifetime management/detection is tantamount to either using heap allocation in the first place or inserting unwind-protect to "mark" an object as dead. Why even try, if the goal is efficiency?

2. Does such an exception object represent a hazard in itself, just by existing, possibly when GC’ed?
Mere existence of a heap-to-stack pointer does not pose a problem for GC