summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp
diff options
context:
space:
mode:
authorMarcos Pividori <mpividori@google.com>2017-02-02 19:07:53 +0000
committerMarcos Pividori <mpividori@google.com>2017-02-02 19:07:53 +0000
commitd64360d935d71dcd01913b656b17e8ec7b76623b (patch)
treecc6eac55b99deff7a6f940c49276aba31bdcf8bf /llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp
parent37e2459186c484eb2e551bac50476621f75311d1 (diff)
downloadbcm5719-llvm-d64360d935d71dcd01913b656b17e8ec7b76623b.tar.gz
bcm5719-llvm-d64360d935d71dcd01913b656b17e8ec7b76623b.zip
[libFuzzer] Properly handle exceptions with UnhandledExceptionFilter.
Use SetUnhandledExceptionFilter instead of AddVectoredExceptionHandler. According to the documentation on Structured Exception Handling, this is the order for the Exception Dispatching: + If the process is being debugged, the system notifies the debugger. + The Vectored Exception Handler is called. + The system attempts to locate a frame-based exception handler by searching the stack frames of the thread in which the exception occurred. + If no frame-based handler can be found, the UnhandledExceptionFilter filter is called. + Default handling based on the exception type. So, similar to what we do for asan, we should use SetUnhandledExceptionFilter instead of AddVectoredExceptionHandler, so user's code that is being fuzzed can execute frame-based exception handlers before we catch them . We want to catch unhandled exceptions, not all the exceptions. Differential Revision: https://reviews.llvm.org/D29462 llvm-svn: 293920
Diffstat (limited to 'llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud