llvm / llvm-project

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

Clang++ crashes when compiling from comand-line #90993

Open bluefish43 opened 2 months ago

bluefish43 commented 2 months ago

Clang++ encountered a segmentation fault when compiling the input file.

Here is its output:

$ clang++ test.cc -o test -Wall -Werror
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
error: null character ignored [-Werror,-Wnull-character]
fatal error: too many errors emitted, stopping now [-ferror-limit=]
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/bin/clang-18 -cc1 -triple x86_64-suse-linux -emit-obj -mrelax-all -dumpdir test- -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name test.cc -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -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/user/Projetos/ccbuild -fcoverage-compilation-dir=/home/user/Projetos/ccbuild -resource-dir /usr/lib64/clang/18 -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../include/c++/13 -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../include/c++/13/x86_64-suse-linux -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../include/c++/13/backward -internal-isystem /usr/lib64/clang/18/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wall -Werror -fdeprecated-macro -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -fcolor-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/test-78294d.o -x c++ test.cc
1.      <unknown> parser at unknown location
 #0 0x00007f71d7bd9a09 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/lib64/libLLVM.so.18.1+0x9d9a09)
 #1 0x00007f71d7bd7430 llvm::sys::RunSignalHandlers() (/lib64/libLLVM.so.18.1+0x9d7430)
 #2 0x00007f71d7bda1fb (/lib64/libLLVM.so.18.1+0x9da1fb)
 #3 0x00007f71d6a41240 __restore_rt (/lib64/libc.so.6+0x41240)
 #4 0x00007f71df017305 clang::Lexer::SkipWhitespace(clang::Token&, char const*, bool&) (/lib64/libclang-cpp.so.18.1+0xa17305)
 #5 0x00007f71df01bc3e clang::Lexer::LexTokenInternal(clang::Token&, bool) (/lib64/libclang-cpp.so.18.1+0xa1bc3e)
 #6 0x00007f71df08663d clang::Preprocessor::Lex(clang::Token&) (/lib64/libclang-cpp.so.18.1+0xa8663d)
 #7 0x00007f71df09566e (/lib64/libclang-cpp.so.18.1+0xa9566e)
 #8 0x00007f71df167744 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67744)
 #9 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633)
#10 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633)
#11 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633)
#12 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633)
#13 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633)
#14 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633)
#15 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633)
#16 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633)
#17 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633)
#18 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633)
#19 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633)
#20 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633)
#21 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633)
#22 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633)
#23 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633)
#24 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633)
#25 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633)
#26 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633)
#27 0x00007f71df0a6798 clang::Parser::SkipMalformedDecl() (/lib64/libclang-cpp.so.18.1+0xaa6798)
#28 0x00007f71df0a5790 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::ParsedAttributes&, clang::SourceLocation*, clang::Parser::ForRangeInit*) (/lib64/libclang-cpp.so.18.1+0xaa5790)
#29 0x00007f71df16c5e7 clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) (/lib64/libclang-cpp.so.18.1+0xb6c5e7)
#30 0x00007f71df16bf98 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (/lib64/libclang-cpp.so.18.1+0xb6bf98)
#31 0x00007f71df16b004 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/lib64/libclang-cpp.so.18.1+0xb6b004)
#32 0x00007f71df169225 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/lib64/libclang-cpp.so.18.1+0xb69225)
#33 0x00007f71df08ec6c clang::ParseAST(clang::Sema&, bool, bool) (/lib64/libclang-cpp.so.18.1+0xa8ec6c)
#34 0x00007f71e132a756 clang::FrontendAction::Execute() (/lib64/libclang-cpp.so.18.1+0x2d2a756)
#35 0x00007f71e129d1b4 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/lib64/libclang-cpp.so.18.1+0x2c9d1b4)
#36 0x00007f71e13a5e36 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/lib64/libclang-cpp.so.18.1+0x2da5e36)
#37 0x000055ea0d0a6660 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang-18+0x12660)
#38 0x000055ea0d0a33a8 (/usr/bin/clang-18+0xf3a8)
#39 0x000055ea0d0a20fb clang_main(int, char**, llvm::ToolContext const&) (/usr/bin/clang-18+0xe0fb)
#40 0x000055ea0d0af6e9 main (/usr/bin/clang-18+0x1b6e9)
#41 0x00007f71d6a2a1f0 __libc_start_call_main (/lib64/libc.so.6+0x2a1f0)
#42 0x00007f71d6a2a2b9 __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x2a2b9)
#43 0x000055ea0d09fb25 _start (/usr/bin/clang-18+0xbb25)
clang++: error: unable to execute command: Segmentation fault (core dumped)
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 18.1.4
Target: x86_64-suse-linux
Thread model: posix
InstalledDir: /usr/bin
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/test-d4937e.cpp
clang++: note: diagnostic msg: /tmp/test-d4937e.sh
clang++: note: diagnostic msg: 

********************

The preprocessed file and associated run script are attached to this issue, with a .txt suffix for me to be able to submit them to GitHub. test-d4937e.cpp.txt test-d4937e.sh.txt

Endilll commented 2 months ago

Doesn't reproduce for me on 18.1.0 and trunk.

Endilll commented 2 months ago

@bluefish43 Can you check how 18.1.5 and trunk work for you? If it still crashes on 18.1.5, we need to identify an offending patch in a timely manner if we want this to be fixed in 18.1.6 (which is going to be the last 18 release).

llvmbot commented 2 months ago

@llvm/issue-subscribers-clang-frontend

Author: bluefish (bluefish43)

Clang++ encountered a segmentation fault when compiling the input file. Here is its output: ``` $ clang++ test.cc -o test -Wall -Werror error: null character ignored [-Werror,-Wnull-character] error: null character ignored [-Werror,-Wnull-character] error: null character ignored [-Werror,-Wnull-character] error: null character ignored [-Werror,-Wnull-character] error: null character ignored [-Werror,-Wnull-character] error: null character ignored [-Werror,-Wnull-character] error: null character ignored [-Werror,-Wnull-character] error: null character ignored [-Werror,-Wnull-character] error: null character ignored [-Werror,-Wnull-character] error: null character ignored [-Werror,-Wnull-character] error: null character ignored [-Werror,-Wnull-character] error: null character ignored [-Werror,-Wnull-character] error: null character ignored [-Werror,-Wnull-character] error: null character ignored [-Werror,-Wnull-character] error: null character ignored [-Werror,-Wnull-character] error: null character ignored [-Werror,-Wnull-character] error: null character ignored [-Werror,-Wnull-character] error: null character ignored [-Werror,-Wnull-character] error: null character ignored [-Werror,-Wnull-character] fatal error: too many errors emitted, stopping now [-ferror-limit=] 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/bin/clang-18 -cc1 -triple x86_64-suse-linux -emit-obj -mrelax-all -dumpdir test- -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name test.cc -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -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/user/Projetos/ccbuild -fcoverage-compilation-dir=/home/user/Projetos/ccbuild -resource-dir /usr/lib64/clang/18 -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../include/c++/13 -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../include/c++/13/x86_64-suse-linux -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../include/c++/13/backward -internal-isystem /usr/lib64/clang/18/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wall -Werror -fdeprecated-macro -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -fcolor-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/test-78294d.o -x c++ test.cc 1. <unknown> parser at unknown location #0 0x00007f71d7bd9a09 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/lib64/libLLVM.so.18.1+0x9d9a09) #1 0x00007f71d7bd7430 llvm::sys::RunSignalHandlers() (/lib64/libLLVM.so.18.1+0x9d7430) #2 0x00007f71d7bda1fb (/lib64/libLLVM.so.18.1+0x9da1fb) #3 0x00007f71d6a41240 __restore_rt (/lib64/libc.so.6+0x41240) #4 0x00007f71df017305 clang::Lexer::SkipWhitespace(clang::Token&, char const*, bool&) (/lib64/libclang-cpp.so.18.1+0xa17305) #5 0x00007f71df01bc3e clang::Lexer::LexTokenInternal(clang::Token&, bool) (/lib64/libclang-cpp.so.18.1+0xa1bc3e) #6 0x00007f71df08663d clang::Preprocessor::Lex(clang::Token&) (/lib64/libclang-cpp.so.18.1+0xa8663d) #7 0x00007f71df09566e (/lib64/libclang-cpp.so.18.1+0xa9566e) #8 0x00007f71df167744 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67744) #9 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633) #10 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633) #11 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633) #12 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633) #13 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633) #14 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633) #15 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633) #16 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633) #17 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633) #18 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633) #19 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633) #20 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633) #21 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633) #22 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633) #23 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633) #24 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633) #25 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633) #26 0x00007f71df167633 clang::Parser::SkipUntil(llvm::ArrayRef<clang::tok::TokenKind>, clang::Parser::SkipUntilFlags) (/lib64/libclang-cpp.so.18.1+0xb67633) #27 0x00007f71df0a6798 clang::Parser::SkipMalformedDecl() (/lib64/libclang-cpp.so.18.1+0xaa6798) #28 0x00007f71df0a5790 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::ParsedAttributes&, clang::SourceLocation*, clang::Parser::ForRangeInit*) (/lib64/libclang-cpp.so.18.1+0xaa5790) #29 0x00007f71df16c5e7 clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) (/lib64/libclang-cpp.so.18.1+0xb6c5e7) #30 0x00007f71df16bf98 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (/lib64/libclang-cpp.so.18.1+0xb6bf98) #31 0x00007f71df16b004 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/lib64/libclang-cpp.so.18.1+0xb6b004) #32 0x00007f71df169225 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/lib64/libclang-cpp.so.18.1+0xb69225) #33 0x00007f71df08ec6c clang::ParseAST(clang::Sema&, bool, bool) (/lib64/libclang-cpp.so.18.1+0xa8ec6c) #34 0x00007f71e132a756 clang::FrontendAction::Execute() (/lib64/libclang-cpp.so.18.1+0x2d2a756) #35 0x00007f71e129d1b4 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/lib64/libclang-cpp.so.18.1+0x2c9d1b4) #36 0x00007f71e13a5e36 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/lib64/libclang-cpp.so.18.1+0x2da5e36) #37 0x000055ea0d0a6660 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang-18+0x12660) #38 0x000055ea0d0a33a8 (/usr/bin/clang-18+0xf3a8) #39 0x000055ea0d0a20fb clang_main(int, char**, llvm::ToolContext const&) (/usr/bin/clang-18+0xe0fb) #40 0x000055ea0d0af6e9 main (/usr/bin/clang-18+0x1b6e9) #41 0x00007f71d6a2a1f0 __libc_start_call_main (/lib64/libc.so.6+0x2a1f0) #42 0x00007f71d6a2a2b9 __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x2a2b9) #43 0x000055ea0d09fb25 _start (/usr/bin/clang-18+0xbb25) clang++: error: unable to execute command: Segmentation fault (core dumped) clang++: error: clang frontend command failed due to signal (use -v to see invocation) clang version 18.1.4 Target: x86_64-suse-linux Thread model: posix InstalledDir: /usr/bin 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/test-d4937e.cpp clang++: note: diagnostic msg: /tmp/test-d4937e.sh clang++: note: diagnostic msg: ******************** ``` The preprocessed file and associated run script are attached to this issue, with a `.txt` suffix for me to be able to submit them to GitHub. [test-d4937e.cpp.txt](https://github.com/llvm/llvm-project/files/15203846/test-d4937e.cpp.txt) [test-d4937e.sh.txt](https://github.com/llvm/llvm-project/files/15203855/test-d4937e.sh.txt)
bluefish43 commented 2 months ago

I would but I do not know exactly what "trunk" is in this case.

Endilll commented 2 months ago

Clang built from a recent commit in main branch.

bluefish43 commented 2 months ago

Okay so it has been building for more than one hour now, and is still at 34%, but I will try to build it as soon as it finishes building.

bluefish43 commented 2 months ago

I am sorry but trying to build clang from llvm-project's main branch resulted in crashing my computer. I don't think I will be able to build it myself, as it seems to be a performance-heavy task.

Endilll commented 2 months ago

One of the typical bottlenecks while building Clang is RAM usage during linking. We have LLVM_PARALLEL_LINK_JOBS CMake variable just for that. You can also try nightly builds from https://apt.llvm.org if you're on Linux.