summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorhboehm <hboehm>2008-02-28 19:05:52 +0100
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:42 +0200
commit4e29beee3c60a7cff48c8de73bfe4fb864d2bb7c (patch)
treeb3385acdb5385fe2dd5ce5d352c248cb84844b64 /malloc.c
parent8b405abe37601f83a613dc99e086650ccdc39907 (diff)
2008-02-28 Hans Boehm <Hans.Boehm@hp.com>
* malloc.c: (free replacement) Fix caller address space check.
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/malloc.c b/malloc.c
index c03dc74..270d0f1 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;
}