[PATCH] D91722: [DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 21 13:03:17 PDT 2021


sbc100 added a comment.

After the third re-land of this patch we are seeing a crash in the emscripten compiler:  https://logs.chromium.org/logs/emscripten-releases/buildbucket/cr-buildbucket.appspot.com/8846604336499720256/+/steps/Emscripten_testsuite__upstream__other_/0/stdout

  cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libbullet.a... (this will be cached in "/b/s/w/ir/k/install/emscripten/cache/sysroot/lib/wasm32-emscripten/libbullet.a" for subsequent builds)
  root:INFO: building port: bullet
  ['--bind', '-O2', '-s', 'EMBIND_STD_STRING_IS_UTF8=0']
  clang++: /b/s/w/ir/cache/builder/emscripten-releases/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp:423: virtual bool (anonymous namespace)::WebAssemblyExplicitLocals::runOnMachineFunction(llvm::MachineFunction &): Assertion `(!MO.isReg() || MRI.use_empty(MO.getReg()) || MFI.isVRegStackified(MO.getReg())) && "WebAssemblyExplicitLocals failed to stackify a register operand"' failed.
  PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
  Stack dump:
  0.	Program arguments: /b/s/w/ir/k/install/bin/clang++ -target wasm32-unknown-emscripten -DEMSCRIPTEN -fignore-exceptions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=22 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=/b/s/w/ir/k/install/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -g -c -O2 -w -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/vectormath/scalar -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/vectormath/sse -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/BulletCollision/CollisionShapes -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/BulletCollision/NarrowPhaseCollision -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/BulletCollision/BroadphaseCollision -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/BulletCollision/Gimpact -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/BulletCollision/CollisionDispatch -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/BulletDynamics/Dynamics -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/BulletDynamics/Vehicle -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/BulletDynamics/Character -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/BulletDynamics/MLCPSolvers -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/BulletDynamics/Featherstone -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/BulletDynamics/ConstraintSolver -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/MiniCL/MiniCLTask -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/vectormath -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/BulletCollision -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/BulletDynamics -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/LinearMath -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/BulletSoftBody -I/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/MiniCL /b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp -o /b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp.o
  1.	<eof> parser at end of file
  2.	Code generation
  3.	Running pass 'Function Pass Manager' on module '/b/s/w/ir/k/install/emscripten/cache/ports-builds/bullet/bullet/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp'.
  4.	Running pass 'WebAssembly Explicit Locals' on function '@_ZN35btSequentialImpulseConstraintSolver28solveGroupCacheFriendlySetupEPP17btCollisionObjectiPP20btPersistentManifoldiPP17btTypedConstraintiRK19btContactSolverInfoP12btIDebugDraw'
   #0 0x00007f98e689efa3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/b/s/w/ir/k/install/bin/../lib/libLLVM-13git.so+0x18d1fa3)
   #1 0x00007f98e689cd9e llvm::sys::RunSignalHandlers() (/b/s/w/ir/k/install/bin/../lib/libLLVM-13git.so+0x18cfd9e)
   #2 0x00007f98e689e31d llvm::sys::CleanupOnSignal(unsigned long) (/b/s/w/ir/k/install/bin/../lib/libLLVM-13git.so+0x18d131d)
   #3 0x00007f98e67d22d3 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) CrashRecoveryContext.cpp:0:0
   #4 0x00007f98e67d243e CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
   #5 0x00007f98e4dc0980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
   #6 0x00007f98e0a02fb7 raise (/lib/x86_64-linux-gnu/libc.so.6+0x3efb7)
   #7 0x00007f98e0a04921 abort (/lib/x86_64-linux-gnu/libc.so.6+0x40921)
   #8 0x00007f98e09f448a (/lib/x86_64-linux-gnu/libc.so.6+0x3048a)
   #9 0x00007f98e09f4502 (/lib/x86_64-linux-gnu/libc.so.6+0x30502)
  #10 0x00007f98e892bb50 (anonymous namespace)::WebAssemblyExplicitLocals::runOnMachineFunction(llvm::MachineFunction&) WebAssemblyExplicitLocals.cpp:0:0
  #11 0x00007f98e6cc5ced llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/b/s/w/ir/k/install/bin/../lib/libLLVM-13git.so+0x1cf8ced)
  #12 0x00007f98e6a194b8 llvm::FPPassManager::runOnFunction(llvm::Function&) (/b/s/w/ir/k/install/bin/../lib/libLLVM-13git.so+0x1a4c4b8)
  #13 0x00007f98e6a21941 llvm::FPPassManager::runOnModule(llvm::Module&) (/b/s/w/ir/k/install/bin/../lib/libLLVM-13git.so+0x1a54941)
  #14 0x00007f98e6a19fcb llvm::legacy::PassManagerImpl::run(llvm::Module&) (/b/s/w/ir/k/install/bin/../lib/libLLVM-13git.so+0x1a4cfcb)
  #15 0x00007f98e39cf5b6 (anonymous namespace)::EmitAssemblyHelper::EmitAssemblyWithNewPassManager(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) BackendUtil.cpp:0:0
  #16 0x00007f98e39c9d33 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/b/s/w/ir/k/install/bin/../lib/libclang-cpp.so.13git+0x265ed33)
  #17 0x00007f98e3cf3e80 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) CodeGenAction.cpp:0:0
  #18 0x00007f98e29e46e4 clang::ParseAST(clang::Sema&, bool, bool) (/b/s/w/ir/k/install/bin/../lib/libclang-cpp.so.13git+0x16796e4)
  #19 0x00007f98e42e9220 clang::FrontendAction::Execute() (/b/s/w/ir/k/install/bin/../lib/libclang-cpp.so.13git+0x2f7e220)
  #20 0x00007f98e425fe7f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/b/s/w/ir/k/install/bin/../lib/libclang-cpp.so.13git+0x2ef4e7f)
  #21 0x00007f98e436821c clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/b/s/w/ir/k/install/bin/../lib/libclang-cpp.so.13git+0x2ffd21c)
  #22 0x00000000002145b2 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/b/s/w/ir/k/install/bin/clang+++0x2145b2)
  #23 0x000000000021213d ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
  #24 0x00007f98e3f37ca2 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::$_1>(long) Job.cpp:0:0
  #25 0x00007f98e67d21e7 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/b/s/w/ir/k/install/bin/../lib/libLLVM-13git.so+0x18051e7)
  #26 0x00007f98e3f377f7 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (/b/s/w/ir/k/install/bin/../lib/libclang-cpp.so.13git+0x2bcc7f7)
  #27 0x00007f98e3f02ce8 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/b/s/w/ir/k/install/bin/../lib/libclang-cpp.so.13git+0x2b97ce8)
  #28 0x00007f98e3f02fb7 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/b/s/w/ir/k/install/bin/../lib/libclang-cpp.so.13git+0x2b97fb7)
  #29 0x00007f98e3f1d091 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/b/s/w/ir/k/install/bin/../lib/libclang-cpp.so.13git+0x2bb2091)
  #30 0x0000000000211a06 main (/b/s/w/ir/k/install/bin/clang+++0x211a06)
  #31 0x00007f98e09e5bf7 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf7)
  #32 0x000000000020ed6a _start (/b/s/w/ir/k/install/bin/clang+++0x20ed6a)
  clang-13: error: clang frontend command failed with exit code 134 (use -v to see invocation)
  clang version 13.0.0 (/b/s/w/ir/cache/git/chromium.googlesource.com-external-github.com-llvm-llvm--project 95612afc1d69ff470943b10210bb902fa14fc4e8)
  Target: wasm32-unknown-emscripten
  Thread model: posix
  InstalledDir: /b/s/w/ir/k/install/bin
  clang-13: note: diagnostic msg: 
  ********************
  
  PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
  Preprocessed source(s) and associated run script(s) are located at:
  clang-13: note: diagnostic msg: /b/s/w/ir/tmp/t/btSequentialImpulseConstraintSolver-d507ac.cpp
  clang-13: note: diagnostic msg: /b/s/w/ir/tmp/t/btSequentialImpulseConstraintSolver-d507ac.sh
  clang-13: note: diagnostic msg: 
  
  ********************

I went back and testing this with the intial landing, and with the 1st and 2nd re-landing and none of those broke us.. Only the 3rd re-landing.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91722



More information about the llvm-commits mailing list