diff options
| author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2019-02-27 21:11:50 +0000 |
|---|---|---|
| committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2019-02-27 21:11:50 +0000 |
| commit | f46a52b5363d22bba6cc6081da295ece181977f2 (patch) | |
| tree | ce42032d6222c39aeaf9e8c30dfdfd63bc9c1f7f /compiler-rt/include | |
| parent | 97b2b0636bc1019f8987ddc53b97d33070f25255 (diff) | |
| download | bcm5719-llvm-f46a52b5363d22bba6cc6081da295ece181977f2.tar.gz bcm5719-llvm-f46a52b5363d22bba6cc6081da295ece181977f2.zip | |
[hwasan, asan] Intercept vfork.
Summary:
Intercept vfork on arm, aarch64, i386 and x86_64.
Reviewers: pcc, vitalybuka
Subscribers: kubamracek, mgorny, javed.absar, krytarowski, kristof.beyls, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D58533
llvm-svn: 355030
Diffstat (limited to 'compiler-rt/include')
| -rw-r--r-- | compiler-rt/include/sanitizer/hwasan_interface.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler-rt/include/sanitizer/hwasan_interface.h b/compiler-rt/include/sanitizer/hwasan_interface.h index 731ffc4014a..104af4caa3d 100644 --- a/compiler-rt/include/sanitizer/hwasan_interface.h +++ b/compiler-rt/include/sanitizer/hwasan_interface.h @@ -50,6 +50,10 @@ extern "C" { // does would cause false reports. void __hwasan_handle_longjmp(const void *sp_dst); + // Set memory tag for the part of the current thread stack below sp_dst to + // zero. Call this in vfork() before returning in the parent process. + void __hwasan_handle_vfork(const void *sp_dst); + // Libc hook for thread creation. Should be called in the child thread before // any instrumented code. void __hwasan_thread_enter(); @@ -65,6 +69,10 @@ extern "C" { // Print one-line report about the memory usage of the current process. void __hwasan_print_memory_usage(); + /* Returns the offset of the first byte in the memory range that can not be + * accessed through the pointer in x, or -1 if the whole range is good. */ + intptr_t __hwasan_test_shadow(const volatile void *x, size_t size); + int __sanitizer_posix_memalign(void **memptr, size_t alignment, size_t size); void * __sanitizer_memalign(size_t alignment, size_t size); void * __sanitizer_aligned_alloc(size_t alignment, size_t size); |

