RFR: 8347347: Build fails undefined symbol: __asan_init by clang17
Julian Waters
jwaters at openjdk.org
Wed Jan 15 13:52:36 UTC 2025
On Wed, 15 Jan 2025 07:42:24 GMT, SendaoYan <syan at openjdk.org> wrote:
> Hi all,
> This PR fix the bugs which build fails "undefined symbol: __asan_init" by clang17 with configure parameter "--enable-asan".
> With clang, [-static-libsan is the default](https://github.com/google/sanitizers/issues/1086#issuecomment-509775957), -shared-libsan forces the linker to use the shared asan run-time. And with [gcc there is no this issue](https://github.com/google/sanitizers/issues/1169#issuecomment-558947352).
> This PR append `-shared-libasan` link flags to `ASAN_LDFLAGS` will fix the make failure. The change has been verified locally, risk is low.
Ok for this current approach. I wonder if it's possible to use static ASAN for clang somehow though
-------------
Marked as reviewed by jwaters (Committer).
PR Review: https://git.openjdk.org/jdk/pull/23124#pullrequestreview-2552806632
More information about the build-dev
mailing list