From f2398ae9ffaf67a653712b222b89ead18e4f1213 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 12 Feb 2012 22:15:40 -0800 Subject: * HACKING: Added note about register save areas, which can contribute to spurious retention. --- ChangeLog | 5 +++++ HACKING | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fe4be800..f29ed61a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-02-12 Kaz Kylheku + + * HACKING: Added note about register save areas, which can contribute + to spurious retention. + 2012-02-12 Kaz Kylheku * debug.c (breakpoints, last_command): linkage changed to static. diff --git a/HACKING b/HACKING index 17c8deb7..20e4dc4f 100644 --- a/HACKING +++ b/HACKING @@ -784,7 +784,9 @@ There are other GC issues that are hard to catch, like spurious retention. This is when the code generated by the C compiler hangs on to an object which, in the source code semantics, should be garbage. It can happen, for example, when a variable has gone out of scope, but the stack location -where that variable was last stored has not been overwritten. +where that variable was last stored has not been overwritten. Register-save +areas in the stack frame can similarly contain stale data, because when a +register value is restored from the save area, the copy remains there. Spurious retention can also happen if a bit pattern is generated which looks ike a reference to an object, by chance. We share this problem with -- cgit v1.2.3