From abc119cc604046c3d007f4364c5be19c2a1c639e Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 2 Feb 2022 09:38:38 +0300 Subject: Fix SIGSEGV while marking some special proc mapping (E2K) Issue #413 (bdwgc). * dyn_load.c [(SCO_ELF || DGUX || HURD || NACL || __ELF__ && (LINUX || FREEBSD || NETBSD || OPENBSD)) && USE_PROC_FOR_LIBRARIES && E2K && __ptr64__] (GC_register_map_entries): Skip c2fffffff000-c30000000000 anonymous writable section; add TODO. --- dyn_load.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'dyn_load.c') diff --git a/dyn_load.c b/dyn_load.c index f14242f9..ab730805 100644 --- a/dyn_load.c +++ b/dyn_load.c @@ -334,6 +334,12 @@ STATIC void GC_register_map_entries(const char *maps) /* Stack mapping; discard */ continue; } +# if defined(E2K) && defined(__ptr64__) + /* TODO: avoid hard-coded addresses */ + if ((word)start == 0xc2fffffff000UL + && (word)end == 0xc30000000000UL && path[0] == '\n') + continue; /* discard some special mapping */ +# endif if (path[0] == '[' && strncmp(path+1, "heap]", 5) != 0) continue; /* discard if a pseudo-path unless "[heap]" */ -- cgit v1.2.1