[PATCH] D152604: [Driver] Default -fsanitize-address-globals-dead-stripping to true for ELF

Mike Hommey via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 6 01:02:04 PDT 2023


glandium added a comment.

In the realm of unintended consequences, this broke ODR violation detection when linking a rust static library with asan enabled because, while __asan_globals_registered is COMDAT in clang, for some reason, it's not in rust... So you end up with two asan.module_ctor that call __asan_register_elf_globals, each with their own __asan_globals_registered, but both using the same range of globals, so all globals are registered twice. (That's probably a bug in the rust compiler. I thought I'd mention this here in case someone follows the same path as I did)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152604/new/

https://reviews.llvm.org/D152604



More information about the cfe-commits mailing list