summaryrefslogtreecommitdiff
path: root/darwin_stop_world.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2019-10-22 00:01:21 +0300
committerIvan Maidanski <ivmai@mail.ru>2019-10-22 00:01:21 +0300
commitdec6ae4c9fadda2caa3f17bcee86464a76210e17 (patch)
tree37fe66065929d84ac3111aa92e3b647d68698d04 /darwin_stop_world.c
parented912875addff7e0724e5da2734b8f878c4f7148 (diff)
downloadbdwgc-dec6ae4c9fadda2caa3f17bcee86464a76210e17.tar.gz
Workaround 'possible null dereference in frame->savedSP' cppcheck FP
* darwin_stop_world.c [!DARWIN_DONT_PARSE_STACK && !POWERPC && !ARM32 && !AARCH64 && CPPCHECK] (GC_FindTopOfStack): Call GC_noop1(&frame) before ABORT().
Diffstat (limited to 'darwin_stop_world.c')
-rw-r--r--darwin_stop_world.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/darwin_stop_world.c b/darwin_stop_world.c
index 05463461..89161bd3 100644
--- a/darwin_stop_world.c
+++ b/darwin_stop_world.c
@@ -73,6 +73,9 @@ GC_INNER ptr_t GC_FindTopOfStack(unsigned long stack_start)
__asm__ __volatile__ ("mov %0, x29\n" : "=r" (sp_reg));
frame = (StackFrame *)sp_reg;
# else
+# if defined(CPPCHECK)
+ GC_noop1((word)&frame);
+# endif
ABORT("GC_FindTopOfStack(0) is not implemented");
# endif
}