[PATCH] D149549: [compiler-rt][interception][win] Don't crash on unknown instructions

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 12 04:20:19 PDT 2023


mstorsjo added a comment.

I tried looking into this, but couldn't seem to reproduce it; I did try in an MSVC build with `-DLLVM_ENABLE_RUNTIMES=compiler-rt`.

In order to look at the issue closer; in a setup where this does trigger failures, can you get the output from `llvm-lit -a` for this individual test from before when it was XFAILing?

If building with LLVM_ENABLE_PROJECTS=compiler-rt (where I understand you don't run into this issue), I run `python bin/llvm-lit.py -a projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\interception_failure_test.cpp` directly in the build directory, and get this output:

  $ "C:/code/llvm-project/llvm/build-msvc/./bin/clang.exe" "-fsanitize=address" "-mno-omit-leaf-frame-pointer" "-fno-omit-frame-pointer" "-fno-optimize-sibling-calls" "-gline-tables-only" "-gcodeview" "-gcolumn-info" "-O0" "C:\code\llvm-project\compiler-rt\test\asan\TestCases\interception_failure_test.cpp" "-o" "C:\code\llvm-project\llvm\build-msvc\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Output\interception_failure_test.cpp.tmp"
  # command output:
  libucrt.lib(strtox.obj) : error LNK2005: strtol already defined in interception_failure_test-657bd4.o
     Creating library C:\code\llvm-project\llvm\build-msvc\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Output\interception_failure_test.cpp.lib and object C:\code\llvm-project\llvm\build-msvc\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Output\interception_failure_test.cpp.exp
  C:\code\llvm-project\llvm\build-msvc\projects\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Output\interception_failure_test.cpp.tmp : fatal error LNK1169: one or more multiply defined symbols found

This seems to be exactly the same issue as is explained in the XFAIL of the test.

In the case of the build with LLVM_ENABLE_RUNTIMES=compiler-rt, I run a similar command in <builddir>/runtimes/runtimes-bins, where I do `python ../../bin/llvm-lit.py -a compiler-rt\test\asan\X86_64WindowsConfig\TestCases\interception_failure_test.cpp`. There I currently get a quite similar error:

  $ "C:/code/llvm-project/llvm/build-msvc/./bin/clang.exe" "-fsanitize=address" "-mno-omit-leaf-frame-pointer" "-fno-omit-frame-pointer" "-fno-optimize-sibling-calls" "-gline-tables-only" "-gcodeview" "-gcolumn-info" "-Wthread-safety" "-Wthread-safety-reference" "-Wthread-safety-beta" "-O0" "C:\code\llvm-project\compiler-rt\test\asan\TestCases\interception_failure_test.cpp" "-o" "C:\code\llvm-project\llvm\build-msvc\runtimes\runtimes-bins\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Output\interception_failure_test.cpp.tmp"
  # command output:
  libucrt.lib(strtox.obj) : error LNK2005: strtol already defined in interception_failure_test-665768.o
     Creating library C:\code\llvm-project\llvm\build-msvc\runtimes\runtimes-bins\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Output\interception_failure_test.cpp.lib and object C:\code\llvm-project\llvm\build-msvc\runtimes\runtimes-bins\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Output\interception_failure_test.cpp.exp
  C:\code\llvm-project\llvm\build-msvc\runtimes\runtimes-bins\compiler-rt\test\asan\X86_64WindowsConfig\TestCases\Output\interception_failure_test.cpp.tmp : fatal error LNK1169: one or more multiply defined symbols found

But if that bisected commit started making this no longer fail, it looks like the test isn't failing for this particular reason for you at the moment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149549



More information about the llvm-commits mailing list