Commit 402823c4 by Bryce McKinlay Committed by Bryce McKinlay

Imported 5.0 release version.

2000-05-11  Bryce McKinlay  <bryce@albatross.co.nz>

        Imported 5.0 release version.
        * acinclude.m4: Increment version to 5.0.

From-SVN: r33832
parent f035fae1
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> 2000-05-07 Bryce McKinlay <bryce@albatross.co.nz>
Imported version 5.0alpha7. Imported version 5.0alpha7.
......
...@@ -3,7 +3,7 @@ Copyright (c) 1991-1996 by Xerox Corporation. All rights reserved. ...@@ -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) 1996-1999 by Silicon Graphics. All rights reserved.
Copyright (c) 1999 by Hewlett-Packard Company. 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 ] See the file ChangeLog for details ]
THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED 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, ...@@ -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 provided the above notices are retained, and a notice that the code was
modified is included with the above copyright notice. 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 You might find a more recent version of this at
...@@ -1602,7 +1602,17 @@ Since 5.0alpha6: ...@@ -1602,7 +1602,17 @@ Since 5.0alpha6:
be done on other platforms, too. Since I can't test those, that'll be done on other platforms, too. Since I can't test those, that'll
wait until after 5.0. 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: To do:
- Integrate Linux/SPARC fixes.
- Very large root set sizes (> 16 MB or so) could cause the collector - Very large root set sizes (> 16 MB or so) could cause the collector
to abort with an unexpected mark stack overflow. (Thanks again to to abort with an unexpected mark stack overflow. (Thanks again to
Peter Chubb.) NOT YET FIXED. Workaround is to increase the initial Peter Chubb.) NOT YET FIXED. Workaround is to increase the initial
......
...@@ -31,7 +31,7 @@ AC_SUBST(boehm_gc_basedir) ...@@ -31,7 +31,7 @@ AC_SUBST(boehm_gc_basedir)
AC_CANONICAL_HOST 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 # 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 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
......
...@@ -43,7 +43,7 @@ AC_SUBST(boehm_gc_basedir) ...@@ -43,7 +43,7 @@ AC_SUBST(boehm_gc_basedir)
AC_CANONICAL_HOST 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 # 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 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
......
...@@ -252,6 +252,17 @@ static void alloc_mark_stack(); ...@@ -252,6 +252,17 @@ static void alloc_mark_stack();
GC_bool GC_mark_some(cold_gc_frame) GC_bool GC_mark_some(cold_gc_frame)
ptr_t 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) { switch(GC_mark_state) {
case MS_NONE: case MS_NONE:
return(FALSE); return(FALSE);
...@@ -342,6 +353,20 @@ ptr_t cold_gc_frame; ...@@ -342,6 +353,20 @@ ptr_t cold_gc_frame;
ABORT("GC_mark_some: bad state"); ABORT("GC_mark_some: bad state");
return(FALSE); 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 */
} }
......
...@@ -667,7 +667,7 @@ ptr_t GC_get_stack_base() ...@@ -667,7 +667,7 @@ ptr_t GC_get_stack_base()
size_t i, buf_offset = 0; size_t i, buf_offset = 0;
f = open("/proc/self/stat", O_RDONLY); 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"); ABORT("Couldn't read /proc/self/stat");
} }
c = stat_buf[buf_offset++]; c = stat_buf[buf_offset++];
......
...@@ -5,11 +5,11 @@ int main() ...@@ -5,11 +5,11 @@ int main()
{ {
# if defined(LINUX_THREADS) # if defined(LINUX_THREADS)
# ifdef USE_LD_WRAP # ifdef USE_LD_WRAP
printf("-Wl,\"--wrap read\" -Wl,\"--wrap dlopen\" " printf("-Wl,--wrap -Wl,read -Wl,--wrap -Wl,dlopen "
"-Wl,\"--wrap pthread_create\" -Wl,\"--wrap pthread_join\" " "-Wl,--wrap -Wl,pthread_create -Wl,--wrap -Wl,pthread_join "
"-Wl,\"--wrap pthread_sigmask\" -lpthread\n"); "-Wl,--wrap -Wl,pthread_sigmask -lpthread -ldl\n");
# else # else
printf("-lpthread\n"); printf("-lpthread -ldl\n");
# endif # endif
# endif # endif
# if defined(IRIX_THREADS) # if defined(IRIX_THREADS)
......
#define GC_VERSION_MAJOR 5 #define GC_VERSION_MAJOR 5
#define GC_VERSION_MINOR 0 #define GC_VERSION_MINOR 0
#define GC_ALPHA_VERSION 7 #define GC_ALPHA_VERSION GC_NOT_ALPHA
# define GC_NOT_ALPHA 0xff # define GC_NOT_ALPHA 0xff
/* This is really an unreleased version which doesn't have a real version */
/* number. */
#ifndef GC_NO_VERSION_VAR #ifndef GC_NO_VERSION_VAR
unsigned GC_version = ((GC_VERSION_MAJOR << 16) | (GC_VERSION_MINOR << 8) | GC_ALPHA_VERSION); unsigned GC_version = ((GC_VERSION_MAJOR << 16) | (GC_VERSION_MINOR << 8) | GC_ALPHA_VERSION);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment