Issue |
92692
|
Summary |
Segmentation fault when compiling LLVM IR with inalloca attribute using Clang-18 and Clang-19.0.0.git
|
Labels |
new issue
|
Assignees |
|
Reporter |
iamanonymouscs
|
# Command
`clang++-18 code.ll -O1`
Additionally, I observed that in some older versions, the compilation process times out and is killed by the system.(see https://godbolt.org/z/Y49xrW999)
# Code
`cat code.ll`
```
define void @f(ptr inalloca(token)) {
ret void
}
```
# Version
`clang++-18 --version`
```sh
Ubuntu clang version 18.1.4 (++20240410110416+b6ebea7972cd-1~exp1~20240410230431.95)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
```
`clang --version`
```sh
clang version 19.0.0git (https://github.com/llvm/llvm-project.git 987087df90026605fc8d03ebda5a1cd31b71e609)
Target: x86_64-unknown-linux-gnu
Thread model: posix
```
# Error Output
```sh
warning: overriding the module target triple with x86_64-pc-linux-gnu [-Woverride-module]
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /usr/lib/llvm-18/bin/clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -dumpdir a- -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name code.ll -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=none -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/home -fcoverage-compilation-dir=/home -resource-dir /usr/lib/llvm-18/lib/clang/18 -O1 -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcolor-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/code-84f3f9.o -x ir code.ll
1. Code generation
2. Running pass 'Function Pass Manager' on module 'code.ll'.
3. Running pass 'X86 DAG->DAG Instruction Selection' on function '@f'
#0 0x00007f14b6747b06 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xd93b06)
#1 0x00007f14b6745ab0 llvm::sys::RunSignalHandlers() (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xd91ab0)
#2 0x00007f14b67481d0 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xd941d0)
#3 0x00007f14b5591090 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x43090)
#4 0x00007f14b6798613 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xde4613)
#5 0x0000559574d017a0
clang++-18: error: unable to execute command: Segmentation fault (core dumped)
clang++-18: error: clang frontend command failed due to signal (use -v to see invocation)
Ubuntu clang version 18.1.4 (++20240410110416+b6ebea7972cd-1~exp1~20240410230431.95)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang++-18: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs