x86-64: Enliven funcallable-instances from unboxed words
commit636d0c7792db309986056a396f680a9686d0b18f
authorDouglas Katzman <dougk@google.com>
Mon, 18 Sep 2017 23:38:10 +0000 (18 19:38 -0400)
committerDouglas Katzman <dougk@google.com>
Mon, 18 Sep 2017 23:44:01 +0000 (18 19:44 -0400)
treef3c5247cd20cd7cf792818f671ded442091bb250
parentf53416ab23f7a40c77215fbd3709e63ea5468429
x86-64: Enliven funcallable-instances from unboxed words

This patch makes immobile_space_preserve_pointer() pin a funcallable-instance
if a stack word (REG_RIP from ucontext) points to it.

It is future-proofing against a sufficiently smart compiler and implementation
of PCL that sucks less. PCL holds on to GFs from a bunch of hash-tables,
so practically speaking, immobile-space GFs are all *permanently* live anyway.

But GC should not be correct due to the failings of others.
It should be correct period. In addition, we can't prove that people
aren't seeing this problem (maybe it actually happens with nonstandard GFs)
src/runtime/marknsweepgc.c
tests/fin-call.impure.lisp [new file with mode: 0644]