diff options
author | Mark Seaborn <mseaborn@chromium.org> | 2013-11-15 17:22:57 -0800 |
---|---|---|
committer | Mark Seaborn <mseaborn@chromium.org> | 2013-11-15 17:22:57 -0800 |
commit | a4504c6f116760d6c0f9f920bb755c3d0136f6c6 (patch) | |
tree | e1fe493774d1531e09ac334d0fc6aa3e97f25797 /lib/Bitcode/NaCl/Reader/NaClBitcodeReader.h | |
parent | 50782b1cdeaad599229ddd529dea1e9eb363833c (diff) |
PNaCl: Change exception info format to distinguish catch-all/cleanup clauses
The initial version of ExceptionInfoWriter.cpp encodes a landingpad's
"cleanup" clause the same as "catch i8* null" (a catch-all).
But it turns out we do want to distinguish these two: If an uncaught
exception occurs, we don't want the runtime to run C++ destructors
(cleanups), because this involves unwinding the stack to jump to
landingpads, which loses the context of where the uncaught exception
was thrown from, which is unhelpful for debugging. (The C++ standard
says it's optional whether destructors are run when an uncaught
exception occurs.)
So, change the encoding as follows:
* Use 0 as the ID for "cleanup" clauses.
* Add 1 to the IDs of types and "catch" clauses. (Adding 1 to both
seems neater than just one of them.)
* This means we can use 0 for the terminator of filter lists instead
of -1, which seems a little neater.
This requires a corresponding change to eh_pnacl.cc in libsupc++.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3696
TEST=NaCl's EH tests with libsupc++ change applied
Review URL: https://codereview.chromium.org/69923008
Diffstat (limited to 'lib/Bitcode/NaCl/Reader/NaClBitcodeReader.h')
0 files changed, 0 insertions, 0 deletions