[PATCH] D23524: [libc++abi] Fix backtrace_test.pass.cpp failure seemingly caused by inlining differences.
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 15 14:15:58 PDT 2016
EricWF created this revision.
EricWF added reviewers: danalbert, jroelofs, mclow.lists.
EricWF added a subscriber: cfe-commits.
The modified assertion fails when the test is compiled at various optimization levels.
The value of `nothrow_traced` and `throw_traced` at various optimization levels are:
* `-O0`: `nothrow_traced = 7`, `throw_traced = 7`
* `-O1`: `nothrow_traced = 4`, `throw_traced = 5`
* `-O2`: `nothrow_traced = 4`, `throw_traced = 4`
* `-O3`: `nothrow_traced = 4`, `throw_traced = 4`
I'm not sure exactly what this test is doing, so I would like somebody else to sign off on this change.
https://reviews.llvm.org/D23524
Files:
test/backtrace_test.pass.cpp
Index: test/backtrace_test.pass.cpp
===================================================================
--- test/backtrace_test.pass.cpp
+++ test/backtrace_test.pass.cpp
@@ -60,6 +60,6 @@
// Different platforms (and different runtimes) will unwind a different number
// of times, so we can't make any better assumptions than this.
assert(nothrow_ntraced > 1);
- assert(throw_ntraced == nothrow_ntraced); // Make sure we unwind through catch
+ assert(throw_ntraced >= nothrow_ntraced); // Make sure we unwind through catch
return 0;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23524.68077.patch
Type: text/x-patch
Size: 549 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160815/d44b6385/attachment-0001.bin>
More information about the cfe-commits
mailing list