[PATCH] D144830: [asan darwin] Allow clients to implement `__sanitizer_report_error_summary`
Dave MacLachlan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 2 10:41:14 PST 2023
dmaclach added a comment.
In D144830#4159426 <https://reviews.llvm.org/D144830#4159426>, @yln wrote:
> In D144830#4157118 <https://reviews.llvm.org/D144830#4157118>, @vitalybuka wrote:
>
>> [... ] __sanitizer_print_stack_trace? Seems like more stable bet.
>
> +1
`__sanitizer_print_stack_trace` is declared in `compiler-rt/include/sanitizer/common_interface_defs.h` which isn't on the include path for `compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp`. If I include it I get an error `error: typedef redefinition with different types ('struct __sanitizer_sandbox_arguments' vs 'struct __sanitizer_sandbox_arguments')` which is accurate because `struct __sanitizer_sandbox_arguments` is declared in both `common_interface_defs.h` and `sanitizer_internal_interface.h`.
If I add a declaration for `__sanitizer_print_stack_trace` to `sanitizer_internal_interface.h` I end up with
Undefined symbols for architecture arm64:
"___sanitizer_print_stack_trace", referenced from:
__sanitizer::InitializePlatformEarly() in sanitizer_mac.cpp.o
when attempting to link ` lib/clang/17/lib/darwin/libclang_rt.stats_osx_dynamic.dylib`. So it looks like I want to test against a symbol that is defined inside of `compiler-rt/lib/sanitizer_common` and `__sanitizer_sandbox_on_notify` seemed like a reasonable candidate.
Thoughts?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144830/new/
https://reviews.llvm.org/D144830
More information about the llvm-commits
mailing list