2008-09-24 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
authorhboehm <hboehm>
Thu, 25 Sep 2008 00:24:21 +0000 (00:24 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:43 +0000 (21:06 +0400)
* finalize.c (GC_general_register_disappearing_link): Remove
redundant code.
* gcj_mlc.c (GC_init_gcj_malloc): Add cast to signed.
* os_dep.c: (GC_write_fault_handler): Remove remaining
references to deleted variable "code".  Remove redundant
FREEBSD definitions.
* include/private/gcconfig.h (GWW_VDB): Define for X86_64 when
defined for X86. (STATIC): Define as "static" with NO_DEBUGGING.

ChangeLog
finalize.c
gcj_mlc.c
include/private/gcconfig.h
os_dep.c

index 04e26c3..c25c9ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-09-24  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
+       * finalize.c (GC_general_register_disappearing_link): Remove
+       redundant code.
+       * gcj_mlc.c (GC_init_gcj_malloc): Add cast to signed.
+       * os_dep.c: (GC_write_fault_handler): Remove remaining
+       references to deleted variable "code".  Remove redundant
+       FREEBSD definitions.
+       * include/private/gcconfig.h (GWW_VDB): Define for X86_64 when
+       defined for X86. (STATIC): Define as "static" with NO_DEBUGGING.
+
 2008-09-24  Hans Boehm <Hans.Boehm@hp.com>
        * include/private/gc_priv.h: Update MAX_HEAP_SECTS.
 
index eb0252c..539abbd 100644 (file)
@@ -169,7 +169,6 @@ GC_API int GC_general_register_disappearing_link(void * * link, void * obj)
        }
     }
     index = HASH2(link, log_dl_table_size);
-    curr_dl = dl_head[index];
     for (curr_dl = dl_head[index]; curr_dl != 0; curr_dl = dl_next(curr_dl)) {
         if (curr_dl -> dl_hidden_link == HIDE_POINTER(link)) {
             curr_dl -> dl_hidden_obj = HIDE_POINTER(obj);
index 5647db6..5d95ad6 100644 (file)
--- a/gcj_mlc.c
+++ b/gcj_mlc.c
@@ -81,7 +81,8 @@ GC_API void GC_init_gcj_malloc(int mp_index, void * /* really GC_mark_proc */mp)
       } else {
        GC_gcj_kind = GC_new_kind_inner(
                        (void **)GC_gcjobjfreelist,
-                       (((word)(-MARK_DESCR_OFFSET - GC_INDIR_PER_OBJ_BIAS))
+                       (((word)(-(signed_word)MARK_DESCR_OFFSET
+                                - GC_INDIR_PER_OBJ_BIAS))
                         | GC_DS_PER_OBJECT),
                        FALSE, TRUE);
       }
index 548c098..a70cab2 100644 (file)
 #        define MPROTECT_VDB
          /* We also avoided doing this in the past with GC_WIN32_THREADS */
          /* Hopefully that's fixed.                                      */
-#      endif
-#      if _MSC_VER >= 1300  /* .NET, i.e. > VisualStudio 6     */
 #         define GWW_VDB
 #      endif
 #       define DATAEND  /* not needed */
 # endif
 
 # ifndef STATIC
-#   define STATIC /* ignore to aid profiling and possibly debugging */
+#   ifndef NO_DEBUGGING
+#     define STATIC /* ignore to aid profiling and possibly debugging */
+#   else
+#     define STATIC static
+#   endif
 # endif
 
 # if defined(LINUX) || defined(HURD) || defined(__GLIBC__)
index fd8fb7b..bd33129 100644 (file)
--- a/os_dep.c
+++ b/os_dep.c
@@ -2622,13 +2622,13 @@ STATIC GC_bool GC_old_segv_handler_used_si;
 #   include <errno.h>
 #   if defined(FREEBSD)
 #     define SIG_OK TRUE
-#     define CODE_OK (code == BUS_PAGE_FAULT)
+#     define CODE_OK (si -> si_code == BUS_PAGE_FAULT)
 #   elif defined(OSF1)
 #     define SIG_OK (sig == SIGSEGV)
-#     define CODE_OK (code == 2 /* experimentally determined */)
+#     define CODE_OK (si -> si_code == 2 /* experimentally determined */)
 #   elif defined(IRIX5)
 #     define SIG_OK (sig == SIGSEGV)
-#     define CODE_OK (code == EACCES)
+#     define CODE_OK (si -> si_code == EACCES)
 #   elif defined(HURD)
 #     define SIG_OK (sig == SIGBUS || sig == SIGSEGV)  
 #     define CODE_OK  TRUE
@@ -2645,9 +2645,6 @@ STATIC GC_bool GC_old_segv_handler_used_si;
                     || (si -> si_code == BUS_UNKNOWN) \
                     || (si -> si_code == SEGV_UNKNOWN) \
                     || (si -> si_code == BUS_OBJERR)
-#   elif defined(FREEBSD)
-#     define SIG_OK (sig == SIGBUS)
-#     define CODE_OK (si -> si_code == BUS_PAGE_FAULT)
 #   elif defined(SUNOS5SIGS)
 #     define SIG_OK (sig == SIGSEGV)
 #     define CODE_OK (si -> si_code == SEGV_ACCERR)