On 11/26/2016 12:11 AM, Daniel Colascione wrote:
1) mark_maybe_pointer looks only for exact matches on object start.
It's perfectly legal for the compiler to keep an interior object
pointer and discard the pointer to the object start.
Yes, just as it's perfectly legal for the compiler to subtract 42 from
every pointer before putting it in a register or storing it into memory.
In practice, though, compilers don't do this around calls to the garbage
collector. (True, this assumption should be documented better.)
2) INTERVAL is GCed, but it's not represented in the memory tree:
struct interval isn't a real lisp object and it's allocated as
MEM_TYPE_NON_LISP. Even a direct pointer to the start of an interval
won't protect it from GC. Shouldn't we treat intervals like conses?
Does the code ever create an interval that is accessible only via locals
when a GC occurs? If not, Emacs should be OK. (This should also be
documented better.)