path: root/os_dep.c
diff options
authorivmai <ivmai>2011-04-18 23:14:54 +0200
committerIvan Maidanski <>2011-07-26 19:06:57 +0200
commit1178f485b6757985b906b7821cb458cba826f696 (patch)
tree6d22c5e9bcd1ce98c6f17f5aa352a87579096cfa /os_dep.c
parent5525068dbc6e9707f5bc703825bf1cfb76eeeb5f (diff)
2011-04-18 Ivan Maidanski <>
* dbg_mlc.c (GC_store_debug_info_inner): Always define; add "const" to its string argument. * dbg_mlc.c (GC_store_debug_info): Call GC_store_debug_info_inner. * dbg_mlc.c (GC_debug_free): Set GC_have_errors in case of smashed or previously deallocated found. * dbg_mlc.c (GC_check_heap_block): Replace while loop with a for one. * reclaim.c (GC_reclaim_check): Ditto. * dbg_mlc.c (GC_check_heap_proc): Remove redundant cast to word. * os_dep.c (GC_get_stack_base): Don't initialize stackbase_main_self/ss_sp on Solaris if thr_main() is zero (thus calling GC_INIT() from a non-primordial thread is possible now). * reclaim.c (GC_add_leaked): Turn into an inline one. * reclaim.c (GC_reclaim_small_nonempty_block): Change report_if_found type from int/word to boolean. * include/private/gc_priv.h (GC_start_reclaim): Ditto. * include/private/gc_priv.h (set_mark_bit_from_hdr, clear_mark_bit_from_hdr): Place closing parenthesis properly; reformat the code.
Diffstat (limited to 'os_dep.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/os_dep.c b/os_dep.c
index b67e00e..75f9c7a 100644
--- a/os_dep.c
+++ b/os_dep.c
@@ -1361,7 +1361,7 @@ GC_INNER word GC_page_size = 0;
/* s.ss_sp holds the pointer to the stack bottom. */
GC_ASSERT((void *)&s HOTTER_THAN s.ss_sp);
- if (!stackbase_main_self)
+ if (!stackbase_main_self && thr_main() != 0)
/* Cache the stack base value for the primordial thread (this */
/* is done during GC_init, so there is no race). */