diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2018-05-07 11:05:15 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2018-05-07 11:05:15 +0300 |
commit | 38d194a365e2e0cbb88601f380df9b8dbf6b0b1d (patch) | |
tree | 4e45b0c0783e7bd1a43ba67e12cb74b7648f980e /dyn_load.c | |
parent | 7924905759fe3b259b04ac8f66ee54c9a6498f4f (diff) | |
download | bdwgc-38d194a365e2e0cbb88601f380df9b8dbf6b0b1d.tar.gz |
Fix infinite restarting of mark_some when a static root disappeared (Linux)
Issue #218 (bdwgc).
* dyn_load.c [USE_PROC_FOR_LIBRARIES] (GC_register_map_entries): Call
GC_remove_roots_subregion for each region which has prot starting
with "---"; add comment.
* include/private/gc_priv.h [USE_PROC_FOR_LIBRARIES]
(GC_remove_roots_subregion): Declare function.
* mark_rts.c[USE_PROC_FOR_LIBRARIES] (GC_remove_roots_subregion):
Implement.
Diffstat (limited to 'dyn_load.c')
-rw-r--r-- | dyn_load.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -389,6 +389,10 @@ STATIC void GC_register_map_entries(char *maps) } if ((word)start < (word)end) GC_add_roots_inner(start, end, TRUE); + } else if (prot[0] == '-' && prot[1] == '-' && prot[2] == '-') { + /* Even roots added statically might disappear partially */ + /* (e.g. the roots added by INCLUDE_LINUX_THREAD_DESCR). */ + GC_remove_roots_subregion(start, end); } } } |