Issue |
126356
|
Summary |
Internal compiler error in clang::Lexer::LexTokenInternal
|
Labels |
clang
|
Assignees |
|
Reporter |
moxian
|
```
$ ninja -C build -k 0
ninja: Entering directory `build'
[1/570] Building CXX object src/CMakeFiles/cataclysm-tiles-common.dir/advanced_inv_area.cpp.o
FAILED: src/CMakeFiles/cataclysm-tiles-common.dir/advanced_inv_area.cpp.o
/usr/bin/c++ -DBACKTRACE -DCMAKE -DGIT_VERSION -DLOCALIZE -DSDL_SOUND -DTILES -DUSE_HOME_DIR -I/home/username/github/Cataclysm-DDA/src -isystem /home/username/github/Cataclysm-DDA/src/third-party -isystem /usr/include/SDL2 -Werror -Wall -Wextra -Wformat-signedness -Wlogical-op -Wmissing-declarations -Wmissing-noreturn -Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual -Wpedantic -Wsuggest-override -Wunused-macros -Wzero-as-null-pointer-constant -Wno-unknown-warning-option -Wno-dangling-reference -Wno-c++20-compat -Wno-unknown-warning-option -Wredundant-decls -fsigned-char -g1 -Og -g2 -std=c++17 -pthread -MD -MT src/CMakeFiles/cataclysm-tiles-common.dir/advanced_inv_area.cpp.o -MF src/CMakeFiles/cataclysm-tiles-common.dir/advanced_inv_area.cpp.o.d -o src/CMakeFiles/cataclysm-tiles-common.dir/advanced_inv_area.cpp.o -c /home/username/github/Cataclysm-DDA/src/advanced_inv_area.cpp
In file included from /home/username/github/Cataclysm-DDA/src/advanced_inv_area.cpp:29:
/home/username/github/Cataclysm-DDA/src/vehicle.h:1152:9: error: unknown type name 'vehicle_part_with_fakes_range'
1152 | vehicle_part_with_fakes_range get_all_parts_with_fakes( bool with_inactive = false ) const;
| ^
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/c++ -DBACKTRACE -DCMAKE -DGIT_VERSION -DLOCALIZE -DSDL_SOUND -DTILES -DUSE_HOME_DIR -I/home/username/github/Cataclysm-DDA/src -isystem /home/username/github/Cataclysm-DDA/src/third-party -isystem /usr/include/SDL2 -Werror -Wall -Wextra -Wformat-signedness -Wlogical-op -Wmissing-declarations -Wmissing-noreturn -Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual -Wpedantic -Wsuggest-override -Wunused-macros -Wzero-as-null-pointer-constant -Wno-unknown-warning-option -Wno-dangling-reference -Wno-c++20-compat -Wno-unknown-warning-option -Wredundant-decls -fsigned-char -g1 -Og -g2 -std=c++17 -pthread -MD -MT src/CMakeFiles/cataclysm-tiles-common.dir/advanced_inv_area.cpp.o -MF src/CMakeFiles/cataclysm-tiles-common.dir/advanced_inv_area.cpp.o.d -o src/CMakeFiles/cataclysm-tiles-common.dir/advanced_inv_area.cpp.o -c /home/username/github/Cataclysm-DDA/src/advanced_inv_area.cpp
1. <unknown> parser at unknown location
2. /home/username/github/Cataclysm-DDA/src/vehicle.h:809:1: parsing struct/union/class body 'vehicle'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 libLLVM.so.18.1 0x00007f93e23fc3bf llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 63
1 libLLVM.so.18.1 0x00007f93e23fa4f9 llvm::sys::RunSignalHandlers() + 89
2 libLLVM.so.18.1 0x00007f93e2346227
3 libc.so.6 0x00007f93e1202330
4 libclang-cpp.so.18.1 0x00007f93e9786c32 clang::Lexer::LexTokenInternal(clang::Token&, bool) + 114
5 libclang-cpp.so.18.1 0x00007f93e97f05ed clang::Preprocessor::Lex(clang::Token&) + 45
6 libclang-cpp.so.18.1 0x00007f93e97afafc clang::Preprocessor::CachingLex(clang::Token&) + 188
7 libclang-cpp.so.18.1 0x00007f93e97afe7d
8 libclang-cpp.so.18.1 0x00007f93e97f05ed clang::Preprocessor::Lex(clang::Token&) + 45
9 libclang-cpp.so.18.1 0x00007f93e97fe29d
10 libclang-cpp.so.18.1 0x00007f93e98bd652 clang::Parser::ExpectAndConsume(clang::tok::TokenKind, unsigned int, llvm::StringRef) + 1666
11 libclang-cpp.so.18.1 0x00007f93e98372a5 clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier, clang::ParsedAttributes&, clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject*) + 7429
12 libclang-cpp.so.18.1 0x00007f93e98385a8 clang::Parser::ParseCXXClassMemberDeclarationWithPragmas(clang::AccessSpecifier&, clang::ParsedAttributes&, clang::TypeSpecifierType, clang::Decl*) + 888
13 libclang-cpp.so.18.1 0x00007f93e9832cb2 clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, clang::SourceLocation, clang::ParsedAttributes&, unsigned int, clang::Decl*) + 3714
14 libclang-cpp.so.18.1 0x00007f93e9830284 clang::Parser::ParseClassSpecifier(clang::tok::TokenKind, clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext, clang::ParsedAttributes&) + 6772
15 libclang-cpp.so.18.1 0x00007f93e9811e1d clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*, clang::ImplicitTypenameContext) + 4317
16 libclang-cpp.so.18.1 0x00007f93e98c3d0d clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) + 205
17 libclang-cpp.so.18.1 0x00007f93e98c3a39 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) + 489
18 libclang-cpp.so.18.1 0x00007f93e98c2c65 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) + 2197
19 libclang-cpp.so.18.1 0x00007f93e98c0f7b clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) + 1499
20 libclang-cpp.so.18.1 0x00007f93e97f847e clang::ParseAST(clang::Sema&, bool, bool) + 766
21 libclang-cpp.so.18.1 0x00007f93eb66762c clang::FrontendAction::Execute() + 92
22 libclang-cpp.so.18.1 0x00007f93eb5e40b4 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 708
23 libclang-cpp.so.18.1 0x00007f93eb6e363d clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 765
24 c++ 0x000055fc462ee42e cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 3694
25 c++ 0x000055fc462eb894
26 libclang-cpp.so.18.1 0x00007f93eb294972
27 libLLVM.so.18.1 0x00007f93e2345f77 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 151
28 libclang-cpp.so.18.1 0x00007f93eb294237 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const + 407
29 libclang-cpp.so.18.1 0x00007f93eb25c518 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const + 888
30 libclang-cpp.so.18.1 0x00007f93eb25c77f clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const + 159
31 libclang-cpp.so.18.1 0x00007f93eb278c20 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) + 352
32 c++ 0x000055fc462eb1ec clang_main(int, char**, llvm::ToolContext const&) + 11180
33 c++ 0x000055fc462f8383 main + 131
34 libc.so.6 0x00007f93e11e71ca
35 libc.so.6 0x00007f93e11e728b __libc_start_main + 139
36 c++ 0x000055fc462e8255 _start + 37
c++: error: clang frontend command failed with exit code 135 (use -v to see invocation)
Ubuntu clang version 18.1.3 (1ubuntu1)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/advanced_inv_area-a55444.cpp
c++: note: diagnostic msg: /tmp/advanced_inv_area-a55444.sh
c++: note: diagnostic msg:
********************
[2/570] Building CXX object src/CMakeFiles/cataclysm-tiles-common.dir/action.cpp.o
FAILED: src/CMakeFiles/cataclysm-tiles-common.dir/action.cpp.o
/usr/bin/c++ -DBACKTRACE -DCMAKE -DGIT_VERSION -DLOCALIZE -DSDL_SOUND -DTILES -DUSE_HOME_DIR -I/home/username/github/Cataclysm-DDA/src -isystem /home/username/github/Cataclysm-DDA/src/third-party -isystem /usr/include/SDL2 -Werror -Wall -Wextra -Wformat-signedness -Wlogical-op -Wmissing-declarations -Wmissing-noreturn -Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual -Wpedantic -Wsuggest-override -Wunused-macros -Wzero-as-null-pointer-constant -Wno-unknown-warning-option -Wno-dangling-reference -Wno-c++20-compat -Wno-unknown-warning-option -Wredundant-decls -fsigned-char -g1 -Og -g2 -std=c++17 -pthread -MD -MT src/CMakeFiles/cataclysm-tiles-common.dir/action.cpp.o -MF src/CMakeFiles/cataclysm-tiles-common.dir/action.cpp.o.d -o src/CMakeFiles/cataclysm-tiles-common.dir/action.cpp.o -c /home/username/github/Cataclysm-DDA/src/action.cpp
In file included from /home/username/github/Cataclysm-DDA/src/action.cpp:42:
/home/username/github/Cataclysm-DDA/src/vehicle.h:1152:9: error: unknown type name 'vehicle_part_with_fakes_range'
1152 | vehicle_part_with_fakes_range get_all_parts_with_fakes( bool with_inactive = false ) const;
| ^
1 error generated.
[2/570] Building CXX object src/CMakeFiles/cataclysm-tiles-common.dir/ammo.cpp.o^C
ninja: build stopped: interrupted by user.
```
/tmp/advanced_inv_area-a55444.cpp and /tmp/advanced_inv_area-a55444.sh: [advanced_inv_area-a55444.zip](https://github.com/user-attachments/files/18717496/advanced_inv_area-a55444.zip)
This is inside fresh-ish WSL Ubuntu 24.04.1 LTS with clang++-18
The crash did not reoccur when I stopped the build and tried anew, so I'm not sure I can provide any extra info
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs