From: Douglas K. <sn...@us...> - 2017-03-16 17:15:36
|
The branch "master" has been updated in SBCL: via 0741b284125eed345b466d3b113d3e43c7babaf1 (commit) from da45d39777499b9775a350084fd0845c90723f70 (commit) - Log ----------------------------------------------------------------- commit 0741b284125eed345b466d3b113d3e43c7babaf1 Author: Douglas Katzman <do...@go...> Date: Thu Mar 16 13:13:39 2017 -0400 Remove assumptions in printf() format strings Namely, concerning the number of hex digits in a pointer --- src/runtime/backtrace.c | 2 +- src/runtime/monitor.c | 20 +++++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/runtime/backtrace.c b/src/runtime/backtrace.c index ea2e339..d1eecb1 100644 --- a/src/runtime/backtrace.c +++ b/src/runtime/backtrace.c @@ -349,7 +349,7 @@ previous_info(struct call_info *info) lispobj lra; if (!cs_valid_pointer_p(info->frame)) { - printf("Bogus callee value (0x%08lx).\n", (uword_t)info->frame); + printf("Bogus callee value (0x%lx).\n", (long)info->frame); return 0; } diff --git a/src/runtime/monitor.c b/src/runtime/monitor.c index d64cb66..c410da9 100644 --- a/src/runtime/monitor.c +++ b/src/runtime/monitor.c @@ -212,30 +212,28 @@ regs_cmd(char **ptr) #ifdef reg_BSP printf("BSP\t=\t%p\n", get_binding_stack_pointer(thread)); #else - /* printf("BSP\t=\t0x%08lx\n", - (unsigned long)SymbolValue(BINDING_STACK_POINTER)); */ + /* printf("BSP\t=\t%p\n", (void*)SymbolValue(BINDING_STACK_POINTER)); */ printf("\n"); #endif #ifdef LISP_FEATURE_GENCGC - /* printf("DYNAMIC\t=\t0x%08lx\n", DYNAMIC_SPACE_START); */ + /* printf("DYNAMIC\t=\t%p\n", (void*)DYNAMIC_SPACE_START); */ #else printf("STATIC\t=\t%p ", - SymbolValue(STATIC_SPACE_FREE_POINTER, thread)); - printf("RDONLY\t=\t0x%08lx ", - (unsigned long)SymbolValue(READ_ONLY_SPACE_FREE_POINTER, thread)); - printf("DYNAMIC\t=\t0x%08lx\n", (unsigned long)current_dynamic_space); + (void*)SymbolValue(STATIC_SPACE_FREE_POINTER, thread)); + printf("RDONLY\t=\t%p ", + (void*)SymbolValue(READ_ONLY_SPACE_FREE_POINTER, thread)); + printf("DYNAMIC\t=\t%p\n", (void*)current_dynamic_space); #endif #ifdef reg_ALLOC - printf("ALLOC\t=\t0x%08lx\n", (unsigned long)dynamic_space_free_pointer); + printf("ALLOC\t=\t%p\n", (void*)dynamic_space_free_pointer); #else - printf("ALLOC\t=\t0x%08lx\n", - (unsigned long)SymbolValue(ALLOCATION_POINTER, thread)); + printf("ALLOC\t=\t%p\n", (void*)SymbolValue(ALLOCATION_POINTER, thread)); #endif #ifndef LISP_FEATURE_GENCGC - printf("TRIGGER\t=\t0x%08lx\n", (unsigned long)current_auto_gc_trigger); + printf("TRIGGER\t=\t%p\n", (void*)current_auto_gc_trigger); #endif } ----------------------------------------------------------------------- hooks/post-receive -- SBCL |