]> granicus.if.org Git - gc/commitdiff
2008-02-28 Hans Boehm <Hans.Boehm@hp.com>
authorhboehm <hboehm>
Thu, 28 Feb 2008 18:05:52 +0000 (18:05 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:42 +0000 (21:06 +0400)
* malloc.c: (free replacement) Fix caller address space check.

ChangeLog
malloc.c

index a078479711746e0c31597c20ffd2e60d9add5c13..b47ebec9c9e3338f657efdd7145590bea7c9d146 100644 (file)
--- 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.
index c03dc741b4e91053050c7e6ea4eeb03a74859c41..270d0f10205a58a9e0da6fff4e07e735399522ad 100644 (file)
--- 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;
          }