Adds a few default implementations for weak
interface functions on platforms where weak hooks are not supported.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Is leak sanitizer currently supported on any platforms that don't support weak hooks? As far as I'm aware, it isn't, although I'm working on adding additional support. This could be tested by adding the stubs necessary for compilation on a platform like Darwin, but I'm not sure whether that's worth the benefits we get.
Unless the testing infra supports changing these defines at test-time, in which case it probably wouldn't be difficult.
The issue is that these SANITIZER_SUPPORTS_WEAK_HOOKS is true on all currently supported platforms (if it wasn't, lsan would fail to link on those platforms, making a test unnecessary anyway). But this patch is required in order to add platforms where SANITIZER_SUPPORTS_WEAK_HOOKS is false. It's also required for consistency with the existing __lsan_is_turned_off() stub.