aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ADT/ArrayRefTest.cpp
diff options
context:
space:
mode:
authorMitch Phillips <31459023+hctim@users.noreply.github.com>2023-01-12 16:01:06 -0800
committerMitch Phillips <31459023+hctim@users.noreply.github.com>2023-01-17 10:21:01 -0800
commit35b5499d7259ac3e5c648a711678290695703a87 (patch)
treee1abe3c07f6d19cd1d41dac9d174c4e3d9581a7c /llvm/unittests/ADT/ArrayRefTest.cpp
parent9c84d20fa69006adcbbaf424f3ef674298045f78 (diff)
downloadllvm-35b5499d7259ac3e5c648a711678290695703a87.zip
llvm-35b5499d7259ac3e5c648a711678290695703a87.tar.gz
llvm-35b5499d7259ac3e5c648a711678290695703a87.tar.bz2
Reland: [GWP-ASan] Add recoverable mode.
The GWP-ASan recoverable mode allows a process to continue to function after a GWP-ASan error is detected. The error will continue to be dumped, but GWP-ASan now has APIs that a signal handler (like the example optional crash handler) can call in order to allow the continuation of a process. When an error occurs with an allocation, the slot used for that allocation will be permanently disabled. This means that free() of that pointer is a no-op, and use-after-frees will succeed (writing and reading the data present in the page). For heap-buffer-overflow/underflow, the guard page is marked as accessible and buffer-overflows will succeed (writing and reading the data present in the now-accessible guard page). This does impact adjacent allocations, buffer-underflow and buffer-overflows from adjacent allocations will no longer touch an inaccessible guard page. This could be improved in future by having two guard pages between each adjacent allocation, but that's out of scope of this patch. Each allocation only ever has a single error report generated. It's whatever came first between invalid-free, double-free, use-after-free or heap-buffer-overflow, but only one. Reviewed By: eugenis, fmayer Differential Revision: https://reviews.llvm.org/D140173
Diffstat (limited to 'llvm/unittests/ADT/ArrayRefTest.cpp')
0 files changed, 0 insertions, 0 deletions