projects
/
platform
/
upstream
/
libgc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a28929
)
Workaround 'possible null pointer dereference' cppcheck warning (Darwin)
author
Ivan Maidanski
<ivmai@mail.ru>
Wed, 26 Oct 2016 21:38:55 +0000
(
00:38
+0300)
committer
Ivan Maidanski
<ivmai@mail.ru>
Wed, 26 Oct 2016 21:38:55 +0000
(
00:38
+0300)
* darwin_stop_world.c [CPPCHECK] (GC_stack_range_for): Call ABORT if
p is NULL and thread_blocked is true.
darwin_stop_world.c
patch
|
blob
|
history
diff --git
a/darwin_stop_world.c
b/darwin_stop_world.c
index
1225217
..
7cd5775
100644
(file)
--- a/
darwin_stop_world.c
+++ b/
darwin_stop_world.c
@@
-142,6
+142,9
@@
STATIC ptr_t GC_stack_range_for(ptr_t *phi, thread_act_t thread, GC_thread p,
# endif
} else if (thread_blocked) {
+# if defined(CPPCHECK)
+ if (NULL == p) ABORT("Invalid GC_thread passed to GC_stack_range_for");
+# endif
lo = p->stop_info.stack_ptr;
# ifndef DARWIN_DONT_PARSE_STACK
*phi = p->topOfStack;