From 4e29beee3c60a7cff48c8de73bfe4fb864d2bb7c Mon Sep 17 00:00:00 2001 From: hboehm Date: Thu, 28 Feb 2008 18:05:52 +0000 Subject: [PATCH] 2008-02-28 Hans Boehm * malloc.c: (free replacement) Fix caller address space check. --- ChangeLog | 4 ++++ malloc.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a0784797..b47ebec9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-02-28 Hans Boehm + + * malloc.c: (free replacement) Fix caller address space check. + 2008-02-25 Hans Boehm * finalize.c (GC_grow_table): Dereference table in null-check. diff --git a/malloc.c b/malloc.c index c03dc741..270d0f10 100644 --- a/malloc.c +++ b/malloc.c @@ -506,7 +506,8 @@ void GC_free_inner(void * p) ptr_t caller = (ptr_t)__builtin_return_address(0); /* This test does not need to ensure memory visibility, since */ /* the bounds will be set when/if we create another thread. */ - if (caller >= GC_libpthread_start && caller > GC_libpthread_end) { + if (caller >= GC_libpthread_start && caller < GC_libpthread_end + || (caller >= GC_libld_start && caller < GC_libld_end)) { GC_free(p); return; } -- 2.49.0