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

Another crash while using checkedC #1161

Open
Arslan8 opened this issue Aug 17, 2021 · 2 comments
Open

Another crash while using checkedC #1161

Arslan8 opened this issue Aug 17, 2021 · 2 comments

Comments

@Arslan8
Copy link

Arslan8 commented Aug 17, 2021

Hi,
I encountered another crash while using checkedC. The crash comes after I try to compile bc to native code. I've enabled thin LTO as well. Here's the backtrace:

PLEASE submit a bug report to https://github.com/Microsoft/checkedc-clang/issues and include the crash backtrace.
Stack dump:
0.	Program arguments: llc -filetype=obj build/RTOSDemo.axf.bc 
 #0 0x0000560fe4dc0d13 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/arslan/projects/LBC/checkedC/src/llvm/lib/Support/Unix/Signals.inc:564:0
 #1 0x0000560fe4dc0da6 PrintStackTraceSignalHandler(void*) /home/arslan/projects/LBC/checkedC/src/llvm/lib/Support/Unix/Signals.inc:625:0
 #2 0x0000560fe4dbeb43 llvm::sys::RunSignalHandlers() /home/arslan/projects/LBC/checkedC/src/llvm/lib/Support/Signals.cpp:68:0
 #3 0x0000560fe4dc0690 SignalHandler(int) /home/arslan/projects/LBC/checkedC/src/llvm/lib/Support/Unix/Signals.inc:406:0
 #4 0x00007f1dc9ad63c0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
 #5 0x00007f1dc953d18b raise /build/glibc-eX1tMB/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #6 0x00007f1dc951c859 abort /build/glibc-eX1tMB/glibc-2.31/stdlib/abort.c:81:7
 #7 0x00007f1dc951c729 get_sysdep_segment_value /build/glibc-eX1tMB/glibc-2.31/intl/loadmsgcat.c:509:8
 #8 0x00007f1dc951c729 _nl_load_domain /build/glibc-eX1tMB/glibc-2.31/intl/loadmsgcat.c:970:34
 #9 0x00007f1dc952df36 (/lib/x86_64-linux-gnu/libc.so.6+0x36f36)
#10 0x0000560fe5926307 (anonymous namespace)::(anonymous namespace)::PlaceholderQueue::~PlaceholderQueue() /home/arslan/projects/LBC/checkedC/src/llvm/lib/Bitcode/Reader/MetadataLoader.cpp:369:0
#11 0x0000560fe5928287 llvm::MetadataLoader::MetadataLoaderImpl::parseMetadata(bool) /home/arslan/projects/LBC/checkedC/src/llvm/lib/Bitcode/Reader/MetadataLoader.cpp:903:0
#12 0x0000560fe593201a llvm::MetadataLoader::parseMetadata(bool) /home/arslan/projects/LBC/checkedC/src/llvm/lib/Bitcode/Reader/MetadataLoader.cpp:2177:0
#13 0x0000560fe590d6b3 llvm::MetadataLoader::parseModuleMetadata() /home/arslan/projects/LBC/checkedC/src/llvm/lib/Bitcode/Reader/MetadataLoader.h:47:0
#14 0x0000560fe58f58e1 (anonymous namespace)::BitcodeReader::parseModule(unsigned long, bool, llvm::function_ref<llvm::Optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > (llvm::StringRef)>) /home/arslan/projects/LBC/checkedC/src/llvm/lib/Bitcode/Reader/BitcodeReader.cpp:3550:0
#15 0x0000560fe58f6ae3 (anonymous namespace)::BitcodeReader::parseBitcodeInto(llvm::Module*, bool, bool, llvm::function_ref<llvm::Optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > (llvm::StringRef)>) /home/arslan/projects/LBC/checkedC/src/llvm/lib/Bitcode/Reader/BitcodeReader.cpp:3739:0
#16 0x0000560fe590964a llvm::BitcodeModule::getModuleImpl(llvm::LLVMContext&, bool, bool, bool, llvm::function_ref<llvm::Optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > (llvm::StringRef)>) /home/arslan/projects/LBC/checkedC/src/llvm/lib/Bitcode/Reader/BitcodeReader.cpp:6606:0
#17 0x0000560fe590abc3 llvm::BitcodeModule::parseModule(llvm::LLVMContext&, llvm::function_ref<llvm::Optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > (llvm::StringRef)>) /home/arslan/projects/LBC/checkedC/src/llvm/lib/Bitcode/Reader/BitcodeReader.cpp:6793:0
#18 0x0000560fe590ac98 llvm::parseBitcodeFile(llvm::MemoryBufferRef, llvm::LLVMContext&, llvm::function_ref<llvm::Optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > (llvm::StringRef)>) /home/arslan/projects/LBC/checkedC/src/llvm/lib/Bitcode/Reader/BitcodeReader.cpp:6801:0
#19 0x0000560fe4577f35 llvm::parseIR(llvm::MemoryBufferRef, llvm::SMDiagnostic&, llvm::LLVMContext&, llvm::function_ref<llvm::Optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > (llvm::StringRef)>) /home/arslan/projects/LBC/checkedC/src/llvm/lib/IRReader/IRReader.cpp:77:0
#20 0x0000560fe457828e llvm::parseIRFile(llvm::StringRef, llvm::SMDiagnostic&, llvm::LLVMContext&, llvm::function_ref<llvm::Optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > (llvm::StringRef)>) /home/arslan/projects/LBC/checkedC/src/llvm/lib/IRReader/IRReader.cpp:103:0
#21 0x0000560fe21c71d0 compileModule(char**, llvm::LLVMContext&) /home/arslan/projects/LBC/checkedC/src/llvm/tools/llc/llc.cpp:483:0
#22 0x0000560fe21c6217 main /home/arslan/projects/LBC/checkedC/src/llvm/tools/llc/llc.cpp:360:0
#23 0x00007f1dc951e0b3 __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:342:3
#24 0x0000560fe21c541e _start (/home/arslan/projects/LBC/checkedC/build/bin/llc+0x178841e)
make: *** [Makefile:105: exec] Aborted (core dumped)
@sulekhark
Copy link
Contributor

Thank you for reporting this issue. It would be great if you could attach a (reduced) test case, and the compilation command line!

@Arslan8
Copy link
Author

Arslan8 commented Aug 18, 2021

Hi @sulekhark! I'll try to make a reduced test case but the project i was running had more than 100 files all merged into one temporary .bc file due to LTO so it will take some time on my end..will post the test case or bc file here soon..

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

No branches or pull requests

2 participants