llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.9k stars 11.94k forks source link

clang integrated assembler segfault #19201

Open llvmbot opened 10 years ago

llvmbot commented 10 years ago
Bugzilla Link 18827
Version 3.4
OS Linux
Attachments multiboot-7ce6f6.S, multiboot-7ce6f6.sh
Reporter LLVM Bugzilla Contributor

Extended Description

PROCESS  kernel/src/machine/multiboot.o (AS)
0  libLLVM-3.4.so  0x00002ad7ef1e83f2 llvm::sys::PrintStackTrace(_IO_FILE*) + 34
1  libLLVM-3.4.so  0x00002ad7ef1e81dc
2  libpthread.so.0 0x00002ad7f009b870
3  libLLVM-3.4.so  0x00002ad7ee8daa5b llvm::MCAsmLayout::ensureValid(llvm::MCFragment const*) const + 27
4  libLLVM-3.4.so  0x00002ad7ee8db139 llvm::MCAsmLayout::getFragmentOffset(llvm::MCFragment const*) const + 9
5  libLLVM-3.4.so  0x00002ad7ee8db2ec llvm::MCAsmLayout::getSymbolOffset(llvm::MCSymbolData const*) const + 428
6  libLLVM-3.4.so  0x00002ad7ee8c6562
7  libLLVM-3.4.so  0x00002ad7ee8dc9ad llvm::MCAssembler::handleFixup(llvm::MCAsmLayout const&, llvm::MCFragment&, llvm::MCFixup const&) + 109
8  libLLVM-3.4.so  0x00002ad7ee8dd7f3 llvm::MCAssembler::Finish() + 595
9  libLLVM-3.4.so  0x00002ad7eeb20b7b
10 clang           0x000000000062a9a1 cc1as_main(char const**, char const**, char const*, void*) + 7329
11 clang           0x0000000000625c78 main + 1832
12 libc.so.6       0x00002ad7f07e4b05 __libc_start_main + 245
13 clang           0x0000000000627b4f
Stack dump:
0.  Program arguments: /usr/bin/clang -cc1as -triple x86_64-unknown-linux-gnu -filetype obj -main-file-name multiboot.S -target-cpu x86-64 -fdebug-compilation-dir /data/code/c/mazix -dwarf-debug-producer clang version 3.4 (tags/RELEASE_34/final) -o kernel/src/machine/multiboot.o /tmp/multiboot-367655.s 
1.  Program arguments: -triple x86_64-unknown-linux-gnu -filetype obj -main-file-name multiboot.S -target-cpu x86-64 -fdebug-compilation-dir /data/code/c/mazix -dwarf-debug-producer clang version 3.4 (tags/RELEASE_34/final) -o kernel/src/machine/multiboot.o /tmp/multiboot-367655.s 
0  libLLVM-3.4.so  0x00002ad7ef1e83f2 llvm::sys::PrintStackTrace(_IO_FILE*) + 34
1  libLLVM-3.4.so  0x00002ad7ef1e81dc
2  libpthread.so.0 0x00002ad7f009b870
3  libLLVM-3.4.so  0x00002ad7ee8daa5b llvm::MCAsmLayout::ensureValid(llvm::MCFragment const*) const + 27
4  libLLVM-3.4.so  0x00002ad7ee8db139 llvm::MCAsmLayout::getFragmentOffset(llvm::MCFragment const*) const + 9
5  libLLVM-3.4.so  0x00002ad7ee8db2ec llvm::MCAsmLayout::getSymbolOffset(llvm::MCSymbolData const*) const + 428
6  libLLVM-3.4.so  0x00002ad7ee8c6562
7  libLLVM-3.4.so  0x00002ad7ee8dc9ad llvm::MCAssembler::handleFixup(llvm::MCAsmLayout const&, llvm::MCFragment&, llvm::MCFixup const&) + 109
8  libLLVM-3.4.so  0x00002ad7ee8dd7f3 llvm::MCAssembler::Finish() + 595
9  libLLVM-3.4.so  0x00002ad7eeb20b7b
10 clang           0x000000000062a9a1 cc1as_main(char const**, char const**, char const*, void*) + 7329
11 clang           0x0000000000625c78 main + 1832
12 libc.so.6       0x00002ad7f07e4b05 __libc_start_main + 245
13 clang           0x0000000000627b4f
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang integrated assembler command failed due to signal (use -v to see invocation)
clang version 3.4 (tags/RELEASE_34/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/multiboot-7ce6f6.S
clang: note: diagnostic msg: /tmp/multiboot-7ce6f6.sh
clang: note: diagnostic msg:
Endilll commented 1 year ago

I can't reproduce the crash, because Clang 16 hangs without consuming much memory.

llvmbot commented 1 year ago

@llvm/issue-subscribers-backend-x86