diff options
author | Bryce McKinlay <bryce@albatross.co.nz> | 2000-05-10 21:59:16 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2000-05-10 22:59:16 +0100 |
commit | 402823c45e9aa790ccbe0e4ce1cac4acdebe02a8 (patch) | |
tree | acd5ad4441f2b173be71279a47ebb3ad91ab054b /boehm-gc/mark.c | |
parent | f035fae1edefcf14efe3ad5404ae14807f17acc7 (diff) | |
download | gcc-402823c45e9aa790ccbe0e4ce1cac4acdebe02a8.zip gcc-402823c45e9aa790ccbe0e4ce1cac4acdebe02a8.tar.gz gcc-402823c45e9aa790ccbe0e4ce1cac4acdebe02a8.tar.bz2 |
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
Diffstat (limited to 'boehm-gc/mark.c')
-rw-r--r-- | boehm-gc/mark.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/boehm-gc/mark.c b/boehm-gc/mark.c index d77e6ac..461d989 100644 --- a/boehm-gc/mark.c +++ b/boehm-gc/mark.c @@ -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 */ } |