Open lasarocamargos opened 4 weeks ago
Hi. Tried to compile the btree.Set example in the README.md with tinygo build -target wasi -o test.wasm and got the following stack trace. Submitted issues to tinygo and llvm projects, so just letting you know.
tinygo build -target wasi -o test.wasm
(weilliptic) ➜ test git:(dev) ✗ tinygo build -target wasi -o test.wasm PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. Stack dump: 0. Running pass 'Function Pass Manager' on module '/tmp/tinygo2382026948/main.o'. 1. Running pass 'WebAssembly Instruction Selection' on function '@"(*github.com/tidwall/btree.Map[string, struct{}]).nodeSet[string struct{}]"' #0 0x0000efc64339d398 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xd9d398) #1 0x0000efc64339b5a8 llvm::sys::RunSignalHandlers() (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xd9b5a8) #2 0x0000efc64339dafc (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xd9dafc) #3 0x0000efc649abb8f8 (linux-vdso.so.1+0x8f8) #4 0x0000efc643b0ba44 llvm::SelectionDAGBuilder::resolveDanglingDebugInfo(llvm::Value const*, llvm::SDValue) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x150ba44) #5 0x0000efc643b0c210 llvm::SelectionDAGBuilder::getValue(llvm::Value const*) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x150c210) #6 0x0000efc643b0cb5c llvm::SelectionDAGBuilder::getValueImpl(llvm::Value const*) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x150cb5c) #7 0x0000efc643b0d058 llvm::SelectionDAGBuilder::getNonRegisterValue(llvm::Value const*) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x150d058) #8 0x0000efc643b0d5f8 llvm::SelectionDAGBuilder::CopyValueToVirtualRegister(llvm::Value const*, unsigned int, llvm::ISD::NodeType) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x150d5f8) #9 0x0000efc643affa94 llvm::SelectionDAGBuilder::HandlePHINodesInSuccessorBlocks(llvm::BasicBlock const*) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x14ffa94) #10 0x0000efc643aff3e0 llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x14ff3e0) #11 0x0000efc643b8303c llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void, true>, false, true>, llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void, true>, false, true>, bool&) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x158303c) #12 0x0000efc643b82a98 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x1582a98) #13 0x0000efc643b80f14 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x1580f14) #14 0x0000efc64375aef0 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x115aef0) #15 0x0000efc6434f5af4 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xef5af4) #16 0x0000efc6434fb070 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xefb070) #17 0x0000efc6434f60d8 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xef60d8) #18 0x0000efc644857010 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x2257010) #19 0x0000efc644857ba8 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x2257ba8) #20 0x0000efc644857a40 llvm::lto::thinBackend(llvm::lto::Config const&, unsigned int, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, llvm::Module&, llvm::ModuleSummaryIndex const&, llvm::DenseMap<llvm::StringRef, std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long>>>> const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*>> const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int>>, llvm::SmallVector<std::pair<llvm::StringRef, llvm::BitcodeModule>, 0u>>*, std::vector<unsigned char, std::allocator<unsigned char>> const&) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x2257a40) #21 0x0000efc644851ce0 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x2251ce0) #22 0x0000efc644851700 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0x2251700) #23 0x0000efc6432c643c (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xcc643c) #24 0x0000efc643346fb4 llvm::ThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xd46fb4) #25 0x0000efc643347a30 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xd47a30) #26 0x0000efc6420c597c (/lib/aarch64-linux-gnu/libc.so.6+0x8597c) #27 0x0000efc64212ba4c (/lib/aarch64-linux-gnu/libc.so.6+0xeba4c)
LLVM issue: llvm/llvm-project#113672 TinyGo issue: tinygo-org/tinygo#4545
Hi. Tried to compile the btree.Set example in the README.md with
tinygo build -target wasi -o test.wasm
and got the following stack trace. Submitted issues to tinygo and llvm projects, so just letting you know.