summaryrefslogtreecommitdiff
path: root/win32_threads.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-03-13 14:08:16 +0100
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:56 +0200
commit667fb0512a70f7756a2c64f0e71c03e1e49a8a4c (patch)
tree67a5fa56f2df6166f717bb634e2370db9091b73f /win32_threads.c
parent35260b7ff2dc15a5194758ab6f3c73fbfb40acb3 (diff)
2011-03-13 Ivan Maidanski <ivmai@mail.ru>
* dbg_mlc.c (GC_make_closure): Fix SEGV in case GC_malloc returns NULL. * dbg_mlc.c (GC_debug_register_finalizer, GC_debug_register_finalizer_no_order, GC_debug_register_finalizer_unreachable, GC_debug_register_finalizer_ignore_self): Handle out of memory case properly (similar to GC_register_finalizer_inner). * headers.c (GC_install_header): Handle the case when alloc_hdr() returns NULL. * os_dep.c (GC_get_maps_len): Defend against missing "maps" file. * pthread_support.c (GC_mark_thread): Place a dummy return statement (which uses "id" argument) before the actual use of "id" as an array index (to suppress a warning produced by some static code analysis tools). * win32_threads.c (GC_mark_thread): Ditto. * pthread_support.c (GC_thr_init): Abort (with the appropriate message) if out of memory.
Diffstat (limited to 'win32_threads.c')
-rw-r--r--win32_threads.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/win32_threads.c b/win32_threads.c
index f7f74ea..99fc14c 100644
--- a/win32_threads.c
+++ b/win32_threads.c
@@ -1500,13 +1500,12 @@ GC_INNER void GC_get_next_stack(char *start, char *limit,
{
word my_mark_no = 0;
+ if ((word)id == (word)-1) return 0; /* to make compiler happy */
marker_sp[(word)id] = GC_approx_sp();
# ifdef IA64
marker_bsp[(word)id] = GC_save_regs_in_stack();
# endif
- if ((word)id == (word)-1) return 0; /* to make compiler happy */
-
for (;; ++my_mark_no) {
if (my_mark_no - GC_mark_no > (word)2) {
/* resynchronize if we get far off, e.g. because GC_mark_no */