llvm
d5149ed6 - [SYCL][TableGen] Emit dynamic table variables as inline (#22594)

Commit
87 days ago
[SYCL][TableGen] Emit dynamic table variables as inline (#22594) DynamicTableEmitter generates a plain (non-inline) global map variable in a header that is #included from multiple translation units. When those TUs end up in different shared libraries loaded into the same process, this violates the One Definition Rule: two strong definitions of DeviceConfigFile::TargetTable get double destructed at exit, causing "double free or corruption" crashes. 0bb722138216 introduced non-inline global. It became a bug on 2026-04-08 with a8dff34478c9 which moved DeviceConfigFile.hpp usage into a second shared library, libLLVMSYCLPostLink.so, creating the second strong definition. It surfaced as a visible crash on 2026-06-12 with b09acde14f87, which added fp8 unittest that links against sycl-jit -> pulling in both libclangDriver.so and libLLVMSYCLPostLink.so in the same process when BUILD_SHARED_LIBS=ON. Fix many check-sycl fails in shared lib build, e.g. SYCL-Unit :: ur/./UrTests-Non_Preview_Tests/failed_to_discover_tests_from_gtest SYCL-Unit-Preview :: ur/Preview/./UrTests-Preview_Tests/failed_to_discover_tests_from_gtest CMPLRLLVM-76620, CMPLRLLVM-76699 --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Author
Parents
Loading