summaryrefslogtreecommitdiff
path: root/dbg_mlc.c
diff options
context:
space:
mode:
authorhboehm <hboehm>2009-06-05 05:59:36 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:45 +0200
commit7e59301c1d5e557a0756762646de39f97766cf3d (patch)
tree3c774e723124199730d62390beacdcc5075e42ad /dbg_mlc.c
parent76946bd3e06a03d01272337c4f945fac4500b394 (diff)
2009-06-04 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
(diff89_cvs, resembling diff3, diff27, diff34, diff38, diff47, diff49, diff59, diff60, diff66, diff67, diff68, diff69a, diff70, diff81 partly) * dbg_mlc.c (GC_store_debug_info, GC_store_debug_info_inner): Remove outdated comment about disabling signals. * mallocx.c (GC_malloc_uncollectable, GC_malloc_atomic_uncollectable): Ditto. * os_dep.c: Ditto. * dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change): Add ARGSUSED tag. * pthread_stop_world.c (GC_suspend_handler, GC_suspend_handler_inner): Ditto. * dbg_mlc.c (GC_debug_free, GC_debug_realloc): Fix printf message. * dbg_mlc.c (GC_debug_realloc): Set "result" to NULL in the default switch branch to suppress compiler warning. * dyn_load.c (GC_init_dyld): Use ABORT() instead of GC_abort(). * include/private/darwin_semaphore.h (sem_init): Ditto. * include/javaxfc.h: Replace "GC_H" with "_GC_H". * include/private/dbg_mlc.h (GC_has_other_debug_info, GC_store_debug_info): Replace K&R-style function prototypes with ANSI C one. * include/private/gcconfig.h (GC_FreeBSDGetDataStart, real_malloc, GC_win32_get_mem, GC_wince_get_mem, GC_unix_get_mem): Ditto. * include/private/pthread_support.h (GC_stop_init): Ditto. * include/private/gcconfig.h: Refine comment about setting GC_stackbottom. * include/private/gcconfig.h (FIXUP_POINTER): Put parentheses in the "right" places. * include/private/pthread_support.h (GC_Thread_Rep): Refine comment for "stack_end" field. * mallocx.c (GC_malloc_uncollectable, GC_malloc_atomic_uncollectable): Remove cast to undefined "hbklk". * os_dep.c (GC_USE_MEM_TOP_DOWN): New macro (for setting GC_mem_top_down to MEM_TOP_DOWN for debug purposes). * os_dep.c (GC_gww_read_dirty, catch_exception_raise): Fix WARN() format specifier (should be word-compliant, "%p" is used w/o "0x"). * pthread_stop_world.c (GC_suspend_handler_inner): Ditto. * os_dep.c (GC_dirty_init): Append new-line to printf messages. * os_dep.c (GC_mprotect_thread): Fix GC_err_printf message. * os_dep.c (GC_save_callers): Change GC_ASSERT to GC_STATIC_ASSERT. * pthread_stop_world.c (GC_retry_signals, GC_suspend_ack_sem): Define as STATIC. * pthread_stop_world.c (GC_push_all_stacks): Add assertion for that "thread_blocked" is not set for the current thread. * real_malloc.c: Add "extern GC_quiet" to suppress compiler warning. * reclaim.c (GC_reclaim_all): Initialize "start_time" (to 0) to suppress compiler warning.
Diffstat (limited to 'dbg_mlc.c')
-rw-r--r--dbg_mlc.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/dbg_mlc.c b/dbg_mlc.c
index 70137d4..dfc13b9 100644
--- a/dbg_mlc.c
+++ b/dbg_mlc.c
@@ -246,9 +246,6 @@ ptr_t GC_store_debug_info(ptr_t p, word sz, const char *string, word integer)
register word * result = (word *)((oh *)p + 1);
DCL_LOCK_STATE;
- /* There is some argument that we should dissble signals here. */
- /* But that's expensive. And this way things should only appear */
- /* inconsistent while we're in the handler. */
LOCK();
GC_ASSERT(GC_size(p) >= sizeof(oh) + sz);
GC_ASSERT(!(SMALL_OBJ(sz) && CROSSES_HBLK(p, sz)));
@@ -278,9 +275,6 @@ STATIC ptr_t GC_store_debug_info_inner(ptr_t p, word sz, char *string,
{
register word * result = (word *)((oh *)p + 1);
- /* There is some argument that we should disable signals here. */
- /* But that's expensive. And this way things should only appear */
- /* inconsistent while we're in the handler. */
GC_ASSERT(GC_size(p) >= sizeof(oh) + sz);
GC_ASSERT(!(SMALL_OBJ(sz) && CROSSES_HBLK(p, sz)));
# ifdef KEEP_BACK_PTRS
@@ -615,10 +609,12 @@ GC_API void * GC_CALL GC_debug_malloc_stubborn(size_t lb, GC_EXTRA_PARAMS)
return GC_debug_malloc(lb, OPT_RA s, i);
}
+/*ARGSUSED*/
GC_API void GC_CALL GC_debug_change_stubborn(void *p)
{
}
+/*ARGSUSED*/
GC_API void GC_CALL GC_debug_end_stubborn_change(void *p)
{
}
@@ -711,7 +707,7 @@ GC_API void GC_CALL GC_debug_free(void * p)
}
if ((ptr_t)p - (ptr_t)base != sizeof(oh)) {
GC_err_printf(
- "GC_debug_free called on pointer %p wo debugging info\n", p);
+ "GC_debug_free called on pointer %p w/o debugging info\n", p);
} else {
# ifndef SHORT_DBG_HDRS
clobbered = GC_check_annotated_obj((oh *)base);
@@ -790,7 +786,7 @@ GC_API void * GC_CALL GC_debug_realloc(void * p, size_t lb, GC_EXTRA_PARAMS)
}
if ((ptr_t)p - (ptr_t)base != sizeof(oh)) {
GC_err_printf(
- "GC_debug_realloc called on pointer %p wo debugging info\n", p);
+ "GC_debug_realloc called on pointer %p w/o debugging info\n", p);
return(GC_realloc(p, lb));
}
hhdr = HDR(base);
@@ -815,6 +811,7 @@ GC_API void * GC_CALL GC_debug_realloc(void * p, size_t lb, GC_EXTRA_PARAMS)
break;
# endif
default:
+ result = NULL; /* initialized to prevent warning. */
GC_err_printf("GC_debug_realloc: encountered bad kind\n");
ABORT("bad kind");
}