[PATCH] D19958: [asan] Bail out on stack overflow in recovery mode.
Maxim Ostapenko via llvm-commits
llvm-commits at lists.llvm.org
Thu May 5 02:17:38 PDT 2016
m.ostapenko created this revision.
m.ostapenko added reviewers: kcc, samsonov, dvyukov.
m.ostapenko added subscribers: llvm-commits, ygribov.
m.ostapenko set the repository for this revision to rL LLVM.
Herald added a subscriber: kubabrecka.
In recovery mode, when ASan detects stack overflow (say, when infinite recursion detected), it tries to continue program execution and hangs on repetitive error reports. There isn't any sense to do it, we can just bail out on stack overflow error, because the program would crash soon anyway.
Repository:
rL LLVM
http://reviews.llvm.org/D19958
Files:
lib/asan/asan_report.cc
Index: lib/asan/asan_report.cc
===================================================================
--- lib/asan/asan_report.cc
+++ lib/asan/asan_report.cc
@@ -739,7 +739,7 @@
u32 ScopedInErrorReport::reporting_thread_tid_;
void ReportStackOverflow(const SignalContext &sig) {
- ScopedInErrorReport in_report;
+ ScopedInErrorReport in_report(/*report*/ nullptr, /*fatal*/ true);
Decorator d;
Printf("%s", d.Warning());
Report(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19958.56247.patch
Type: text/x-patch
Size: 441 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160505/7b0d1283/attachment.bin>
More information about the llvm-commits
mailing list