2000-05-11 Bryce McKinlay <bryce@albatross.co.nz>
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 May 2000 21:59:16 +0000 (21:59 +0000)
committerbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 May 2000 21:59:16 +0000 (21:59 +0000)
        Imported 5.0 release version.
        * acinclude.m4: Increment version to 5.0.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33832 138bc75d-0d04-0410-961f-82ee72b054a4

boehm-gc/ChangeLog
boehm-gc/README
boehm-gc/acinclude.m4
boehm-gc/aclocal.m4
boehm-gc/mark.c
boehm-gc/os_dep.c
boehm-gc/threadlibs.c
boehm-gc/version.h

index ba8abd1..6285590 100644 (file)
@@ -1,3 +1,8 @@
+2000-05-11  Bryce McKinlay  <bryce@albatross.co.nz>
+
+       Imported 5.0 release version.
+       * acinclude.m4: Increment version to 5.0.
+
 2000-05-07  Bryce McKinlay  <bryce@albatross.co.nz>
 
        Imported version 5.0alpha7.
index b897790..083c7a7 100644 (file)
@@ -3,7 +3,7 @@ Copyright (c) 1991-1996 by Xerox Corporation.  All rights reserved.
 Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
 Copyright (c) 1999 by Hewlett-Packard Company. All rights reserved.
 
-  [ This version of the collector modified by Cygnus Solutions.
+  [ This version of the collector modified for use in libgcj.
     See the file ChangeLog for details ]
 
 THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
@@ -15,7 +15,7 @@ Permission to modify the code and to distribute modified code is granted,
 provided the above notices are retained, and a notice that the code was
 modified is included with the above copyright notice.
 
-This is version 5.0alpha7 of a conservative garbage collector for C and C++.
+This is version 5.0 of a conservative garbage collector for C and C++.
 
 You might find a more recent version of this at
 
@@ -1602,7 +1602,17 @@ Since 5.0alpha6:
    be done on other platforms, too.  Since I can't test those, that'll
    wait until after 5.0.
 
+Since 5.0alpha7:
+ - Fixed threadlibs.c for linux threads.  -DUSE_LD_WRAP was broken and
+   -ldl was omitted.  Fixed Linux stack finding code to handle
+   -DUSE_LD_WRAP correctly.
+ - Added MSWIN32 exception handler around marker, so that the collector
+   can recover from root segments that are unmapped during the collection.
+   This caused occasional failures under Windows 98, and may also be
+   an issue under Windows NT/2000.
+
 To do:
+ - Integrate Linux/SPARC fixes.
  - Very large root set sizes (> 16 MB or so) could cause the collector
    to abort with an unexpected mark stack overflow.  (Thanks again to
    Peter Chubb.)  NOT YET FIXED.  Workaround is to increase the initial
index c9e36ce..2747858 100644 (file)
@@ -31,7 +31,7 @@ AC_SUBST(boehm_gc_basedir)
 
 AC_CANONICAL_HOST
 
-AM_INIT_AUTOMAKE(boehm-gc, 5.0a7, no-define)
+AM_INIT_AUTOMAKE(boehm-gc, 5.0, no-define)
 
 # FIXME: We temporarily define our own version of AC_PROG_CC.  This is
 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
index 879db96..797bddc 100644 (file)
@@ -43,7 +43,7 @@ AC_SUBST(boehm_gc_basedir)
 
 AC_CANONICAL_HOST
 
-AM_INIT_AUTOMAKE(boehm-gc, 5.0a6, no-define)
+AM_INIT_AUTOMAKE(boehm-gc, 5.0, no-define)
 
 # FIXME: We temporarily define our own version of AC_PROG_CC.  This is
 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
index d77e6ac..461d989 100644 (file)
@@ -252,6 +252,17 @@ static void alloc_mark_stack();
 GC_bool GC_mark_some(cold_gc_frame)
 ptr_t cold_gc_frame;
 {
+#ifdef MSWIN32
+  /* Windows 98 appears to asynchronously create and remove writable   */
+  /* memory mappings, for reasons we haven't yet understood.  Since    */
+  /* we look for writable regions to determine the root set, we may    */
+  /* try to mark from an address range that disappeared since we       */
+  /* started the collection.  Thus we have to recover from faults here. */
+  /* This code does not appear to be necessary for Windows 95/NT/2000. */ 
+  /* Note that this code should never generate an incremental GC write */
+  /* fault.                                                            */
+  __try {
+#endif
     switch(GC_mark_state) {
        case MS_NONE:
            return(FALSE);
@@ -342,6 +353,20 @@ ptr_t cold_gc_frame;
            ABORT("GC_mark_some: bad state");
            return(FALSE);
     }
+#ifdef MSWIN32
+  } __except (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION ?
+           EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) {
+#   ifdef PRINTSTATS
+       GC_printf0("Caught ACCESS_VIOLATION in marker. "
+                  "Memory mapping disappeared.\n");
+#   endif /* PRINTSTATS */
+    /* We have bad roots on the stack.  Discard mark stack.    */
+    /* Rescan from marked objects.  Redetermine roots.         */
+    GC_invalidate_mark_state();        
+    scan_ptr = 0;
+    return FALSE;
+  }
+#endif /* MSWIN32 */
 }
 
 
index 636495e..b169eeb 100644 (file)
@@ -667,7 +667,7 @@ ptr_t GC_get_stack_base()
     size_t i, buf_offset = 0;
 
     f = open("/proc/self/stat", O_RDONLY);
-    if (f < 0 || read(f, stat_buf, STAT_BUF_SIZE) < 2 * STAT_SKIP) {
+    if (f < 0 || STAT_READ(f, stat_buf, STAT_BUF_SIZE) < 2 * STAT_SKIP) {
        ABORT("Couldn't read /proc/self/stat");
     }
     c = stat_buf[buf_offset++];
index b2e6a10..7379454 100644 (file)
@@ -5,11 +5,11 @@ int main()
 {
 #   if defined(LINUX_THREADS)
 #     ifdef USE_LD_WRAP
-       printf("-Wl,\"--wrap read\" -Wl,\"--wrap dlopen\" "
-              "-Wl,\"--wrap pthread_create\" -Wl,\"--wrap pthread_join\" "
-              "-Wl,\"--wrap pthread_sigmask\" -lpthread\n");
+       printf("-Wl,--wrap -Wl,read -Wl,--wrap -Wl,dlopen "
+              "-Wl,--wrap -Wl,pthread_create -Wl,--wrap -Wl,pthread_join "
+              "-Wl,--wrap -Wl,pthread_sigmask -lpthread -ldl\n");
 #     else
-       printf("-lpthread\n");
+       printf("-lpthread -ldl\n");
 #     endif
 #   endif
 #   if defined(IRIX_THREADS)
index 2aedacc..2c69e44 100644 (file)
@@ -1,12 +1,9 @@
 #define GC_VERSION_MAJOR 5
 #define GC_VERSION_MINOR 0
-#define GC_ALPHA_VERSION 7
+#define GC_ALPHA_VERSION GC_NOT_ALPHA
 
 #   define GC_NOT_ALPHA 0xff
 
-/* This is really an unreleased version which doesn't have a real version */
-/* number.                                                               */
-
 #ifndef GC_NO_VERSION_VAR
 
 unsigned GC_version = ((GC_VERSION_MAJOR << 16) | (GC_VERSION_MINOR << 8) | GC_ALPHA_VERSION);