[llvm-branch-commits] [test-suite] r362747 - Merging r357986:

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jun 6 14:04:17 PDT 2019


Author: tstellar
Date: Thu Jun  6 14:04:17 2019
New Revision: 362747

URL: http://llvm.org/viewvc/llvm-project?rev=362747&view=rev
Log:
Merging r357986:
------------------------------------------------------------------------
r357986 | jyknight | 2019-04-09 02:21:45 -0700 (Tue, 09 Apr 2019) | 22 lines

Fix siod's gc implementation when used with GLIBC.

Patch from LuoYuanke --

In the siod gc, it depends on setjmp(...) to get the value of callee
saved register value, and traverse those register to get the possible
local object pointer. Also it traverse current stack to get the
possible local object pointer. For setjmp(...) on glibc X86-64, the
rbp register (callee saved register) is NOT saved in the setjmp
buffer, so object that pointed by rbp is NOT considered as local
object variable and its memory is collected as garbage. This patch is
to use getcontext(...) to get more register value of current context
and traverse those register to protect object from garbage collection.

This bug is not easy to expose, because usually rbp has been saved in
stack when do garbage collection, so the object pointer can be scanned
from stack. However when compiler do some optimization on register
allocation or licm, the rbp live in gc_mark_and_sweep(...) and rbp is
pointing to an object. In such situation, siod failed to run test.scm
because object is collected as garbage unexpectedly.

Differential Revision: D60039
------------------------------------------------------------------------

Modified:
    test-suite/branches/release_80/   (props changed)

Propchange: test-suite/branches/release_80/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun  6 14:04:17 2019
@@ -0,0 +1 @@
+/test-suite/trunk:357986*




More information about the llvm-branch-commits mailing list