Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LLVMJIT] setBitsSlowCase crashing. why? #115064

Open
trcrsired opened this issue Nov 5, 2024 · 2 comments
Open

[LLVMJIT] setBitsSlowCase crashing. why? #115064

trcrsired opened this issue Nov 5, 2024 · 2 comments

Comments

@trcrsired
Copy link

$ wavm run  --mount-root . ./construct_fstream_from_syscall.wasm 
unhandled SIGSEGV
Call stack:
  /home/cqwrteur/softwares/wavm/x86_64-generic-linux-gnu/lib/libWAVM.so.0!WAVM::Errors::fatalfWithCallStack(char const*, ...)+134
  /home/cqwrteur/softwares/wavm/x86_64-generic-linux-gnu/lib/libWAVM.so.0+2744867
  /usr/lib/libc.so.6+250319
  /home/cqwrteur/toolchains/llvm/x86_64-generic-linux-gnu/llvm/lib/libLLVMSupport.so.20.0git!llvm::APInt::setBitsSlowCase(unsigned int, unsigned int)+66
  /home/cqwrteur/toolchains/llvm/x86_64-generic-linux-gnu/llvm/lib/../lib/libLLVMAnalysis.so.20.0git+4896941
  /home/cqwrteur/toolchains/llvm/x86_64-generic-linux-gnu/llvm/lib/../lib/libLLVMAnalysis.so.20.0git+4916780
  /home/cqwrteur/toolchains/llvm/x86_64-generic-linux-gnu/llvm/lib/../lib/libLLVMAnalysis.so.20.0git!llvm::computeKnownBits(llvm::Value const*, llvm::KnownBits&, unsigned int, llvm::SimplifyQuery const&)+89
  /home/cqwrteur/toolchains/llvm/x86_64-generic-linux-gnu/llvm/lib/libLLVMInstCombine.so.20.0git+1602210
  /home/cqwrteur/toolchains/llvm/x86_64-generic-linux-gnu/llvm/lib/libLLVMInstCombine.so.20.0git+1631861
  /home/cqwrteur/toolchains/llvm/x86_64-generic-linux-gnu/llvm/lib/libLLVMInstCombine.so.20.0git+1634158
  /home/cqwrteur/toolchains/llvm/x86_64-generic-linux-gnu/llvm/lib/libLLVMInstCombine.so.20.0git+1553745
  /home/cqwrteur/toolchains/llvm/x86_64-generic-linux-gnu/llvm/lib/libLLVMInstCombine.so.20.0git+1574941
  /home/cqwrteur/toolchains/llvm/x86_64-generic-linux-gnu/llvm/lib/libLLVMInstCombine.so.20.0git+332624
  /home/cqwrteur/toolchains/llvm/x86_64-generic-linux-gnu/llvm/lib/libLLVMInstCombine.so.20.0git+341757
  /home/cqwrteur/toolchains/llvm/x86_64-generic-linux-gnu/llvm/lib/libLLVMInstCombine.so.20.0git!llvm::InstructionCombiningPass::runOnFunction(llvm::Function&)+1359
  /home/cqwrteur/toolchains/llvm/x86_64-generic-linux-gnu/llvm/lib/libLLVMCore.so.20.0git!llvm::FPPassManager::runOnFunction(llvm::Function&)+1608
  /home/cqwrteur/toolchains/llvm/x86_64-generic-linux-gnu/llvm/lib/libLLVMCore.so.20.0git!llvm::legacy::FunctionPassManagerImpl::run(llvm::Function&)+82
  /home/cqwrteur/softwares/wavm/x86_64-generic-linux-gnu/lib/libWAVM.so.0+4033714
  /home/cqwrteur/softwares/wavm/x86_64-generic-linux-gnu/lib/libWAVM.so.0!WAVM::LLVMJIT::compileLLVMModule(WAVM::LLVMJIT::LLVMContext&, llvm::Module&&, bool, llvm::TargetMachine*)+41
  /home/cqwrteur/softwares/wavm/x86_64-generic-linux-gnu/lib/libWAVM.so.0!WAVM::LLVMJIT::compileModule(WAVM::IR::Module const&, WAVM::LLVMJIT::TargetSpec const&)+118
  /home/cqwrteur/softwares/wavm/x86_64-generic-linux-gnu/lib/libWAVM.so.0!WAVM::Runtime::loadBinaryModule(unsigned char const*, unsigned long, std::shared_ptr<WAVM::Runtime::Module>&, WAVM::IR::FeatureSpec const&, WAVM::WASM::LoadError*)+371
  wavm+248628
  wavm+247285
  /home/cqwrteur/softwares/wavm/x86_64-generic-linux-gnu/lib/libWAVM.so.0!WAVM::Platform::catchSignals(void (*)(void*), bool (*)(void*, WAVM::Platform::Signal, WAVM::Platform::CallStack&&), void*)+205
  /home/cqwrteur/softwares/wavm/x86_64-generic-linux-gnu/lib/libWAVM.so.0!WAVM::Runtime::catchRuntimeExceptions(std::function<void ()> const&, std::function<void (WAVM::Runtime::Exception*)> const&)+70
  wavm+246268
  wavm+245815
  /usr/lib/libc.so.6+155143
  /usr/lib/libc.so.6+139
  wavm+81232
Aborted (core dumped)
@trcrsired
Copy link
Author

trcrsired commented Nov 5, 2024

consir.zip

I have tried configuring WAVM to generate unoptimized LLVM IR, which works without crashing. However, when generating optimized LLVM IR, it crashes. It used to work before. Could this imply that recent changes have introduced issues with specific optimizations?

@trcrsired
Copy link
Author

@alexey-bataev Hi? ty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant