zeroomega wrote: Hi
We are seeing test failures in our downstream `clang-linux-arm64` build after this change was landed. (public build log: https://ci.chromium.org/b/8665190475834106177). **Failing Step / Test:** `clang|test` (`cfi-devirt-lld-thinlto-aarch64 :: normalize-integers-wpd.cpp` and `cfi-standalone-lld-thinlto-aarch64 :: normalize-integers-wpd.cpp`) **Error Output:** ``` /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/test/cfi/normalize-integers-wpd.cpp:65:16: error: DEVIRT-DAG: expected string not found in input // DEVIRT-DAG: single-impl: devirtualized a call to _ZNK12_GLOBAL__N_17Primary3tagEv ^ <stdin>:1:1: note: scanning from here --lto-validate-all-vtables-have-type-infos: RTTI missing for vtable _ZTVN9libunwind12UnwindCursorINS_17LocalAddressSpaceENS_15Registers_arm64EEE, --lto-whole-program-visibility disabled ``` >From our automated triage pipeline, the rational is: > The newly added test `compiler-rt/test/cfi/normalize-integers-wpd.cpp` passes > `-Wl,--lto-validate-all-vtables-have-type-infos`. On AArch64 Linux, linking > C++ pulls in `libunwind`, whose `UnwindCursor<LocalAddressSpace, > Registers_arm64>` has a vtable built without RTTI. LLD's > `--lto-validate-all-vtables-have-type-infos` check detects the missing RTTI > for `_ZTVN9libunwind12UnwindCursor...` and conservatively disables > `--lto-whole-program-visibility`, so the expected WPD devirtualization > remarks are not emitted. We have a verified fix forward patch that clears the test failure in a local build: ```diff --- a/compiler-rt/test/cfi/normalize-integers-wpd.cpp +++ b/compiler-rt/test/cfi/normalize-integers-wpd.cpp @@ -19,6 +19,7 @@ // RUN: %clangxx -O2 -flto=thin -fuse-ld=lld %t.kcfi.a.o %t.kcfi.main.o \ // RUN: -o %t.kcfi.uniform -Wl,--lto-whole-program-visibility \ // RUN: -Wl,--lto-validate-all-vtables-have-type-infos \ +// RUN: -Wl,--lto-known-safe-vtables='_ZTVN9libunwind*' \ // RUN: -Wl,-mllvm,-pass-remarks=wholeprogramdevirt 2>&1 | \ // RUN: FileCheck %s --check-prefix=DEVIRT // RUN: %run %t.kcfi.uniform @@ -46,6 +47,7 @@ // RUN: %clangxx -O2 -flto=thin -fuse-ld=lld -fsanitize=cfi-icall \ // RUN: -fsanitize-trap=cfi-icall %t.cfi.a.o %t.cfi.main.o \ // RUN: -o %t.cfi.uniform -Wl,--lto-whole-program-visibility \ // RUN: -Wl,--lto-validate-all-vtables-have-type-infos \ +// RUN: -Wl,--lto-known-safe-vtables='_ZTVN9libunwind*' \ // RUN: -Wl,-mllvm,-pass-remarks=wholeprogramdevirt 2>&1 | \ // RUN: FileCheck %s --check-prefix=DEVIRT // RUN: %run %t.cfi.uniform ``` Could you please take a look or land a quick fix-forward? Thanks! https://github.com/llvm/llvm-project/pull/242466 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
