Fix Win32 GC_write preventing potential infinite recursion at abort
authorIvan Maidanski <ivmai@mail.ru>
Sun, 11 Nov 2012 14:57:29 +0000 (18:57 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 11 Nov 2012 15:26:24 +0000 (19:26 +0400)
commit608fe467d3d21bb5aa9ed7fd11e360a3d0705b21
tree9babeff0ea2b5d4c3da584516298fb0caf1195a6
parentb4ba527cd4094eaf9ab8e698a85231a3de36dc49
Fix Win32 GC_write preventing potential infinite recursion at abort

* misc.c (GC_write): Define "inside_write" static variable (only
for Win32 and only if THREADS and GC_ASSERTIONS or
GC_PRINT_VERBOSE_STATS); if this variable is set then just return,
set this variable if GC_write_disabled or GC_log is
INVALID_HANDLE_VALUE just before ABORT call (to prevent infinite
recursion).
* misc.c (GC_default_on_abort): Do not call WRITE if GC_write_disabled
(only for Win32 and only if THREADS and GC_ASSERTIONS) to prevent
abort in GC_write.
misc.c