summaryrefslogtreecommitdiff
path: root/debuggerd/crasher/crasher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'debuggerd/crasher/crasher.cpp')
-rw-r--r--debuggerd/crasher/crasher.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/debuggerd/crasher/crasher.cpp b/debuggerd/crasher/crasher.cpp
index a2b13a36c..db30b8f07 100644
--- a/debuggerd/crasher/crasher.cpp
+++ b/debuggerd/crasher/crasher.cpp
@@ -134,10 +134,14 @@ noinline int crash(int a) {
return a*2;
}
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wfree-nonheap-object"
+
noinline void abuse_heap() {
char buf[16];
free(buf); // GCC is smart enough to warn about this, but we're doing it deliberately.
}
+#pragma clang diagnostic pop
noinline void leak() {
while (true) {