Repository navigation
Commit a5e2042
authored
Compile folly's SanitizeLeak.cpp in Fantom's tester
## Summary:
Fantom's tester doesn't link when it's built with AddressSanitizer. Under `-fsanitize=address`, folly headers like `small_vector.h` and `Singleton.h` call `folly::detail::annotate_object_leaked_impl` and `annotate_object_collected_impl`, and only `folly/memory/SanitizeLeak.cpp` defines them. Fantom's folly build compiles `SanitizeAddress.cpp` and `SanitizeThread.cpp` but not that file, so the link fails on both symbols.
This adds `folly/memory/SanitizeLeak.cpp` to `folly_runtime_SRC`, which the `RCT-Folly` podspec already compiles. Without ASan the file only defines those functions, nothing calls them.
Fixes #59668
## Changelog:
[INTERNAL] [FIXED] - Fix Fantom tester link under AddressSanitizer by compiling folly's SanitizeLeak.cpp
## Test Plan:
I couldn't run the full Fantom build here, so I checked the link against folly v2024.11.18.00 (the version Fantom pins) with clang and `-fsanitize=address`. A small program using `folly::small_vector`, linked with the `folly_runtime` sources it needs, fails with undefined `annotate_object_leaked_impl` / `annotate_object_collected_impl`. Adding `SanitizeLeak.cpp` makes it link and run.
Differential Revision: D128600166
Pull Request resolved: #596741 parent 4d536fa commit a5e2042
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
0 commit comments