summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhboehm <hboehm>2008-02-28 18:05:52 +0000
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 21:06:42 +0400
commit4e29beee3c60a7cff48c8de73bfe4fb864d2bb7c (patch)
treeb3385acdb5385fe2dd5ce5d352c248cb84844b64
parent8b405abe37601f83a613dc99e086650ccdc39907 (diff)
downloadbdwgc-4e29beee3c60a7cff48c8de73bfe4fb864d2bb7c.tar.gz
2008-02-28 Hans Boehm <Hans.Boehm@hp.com>
* malloc.c: (free replacement) Fix caller address space check.
-rw-r--r--ChangeLog4
-rw-r--r--malloc.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a0784797..b47ebec9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-02-28 Hans Boehm <Hans.Boehm@hp.com>
+
+ * malloc.c: (free replacement) Fix caller address space check.
+
2008-02-25 Hans Boehm <Hans.Boehm@hp.com>
* 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;
}