Skip to content

TableGen/Record.cpp:1567:41: runtime error: shift exponent 18446744073709551612 is too large for 64-bit type 'uint64_t' (aka 'unsigned long long') #151831

@nuudlman

Description

@nuudlman

commit 8e9e38a

Backtrace:

cd /Volumes/hynixP41/llvm-project/slow_debug/include/llvm/TargetParser && /Volumes/hynixP41/llvm-project/slow_debug/bin/llvm-min-tblgen -gen-riscv-target-def -I/Volumes/hynixP41/llvm-project/src/llvm/include/llvm/TargetParser -I/Volumes/hynixP41/llvm-project/src/llvm/lib/Target/RISCV -I/Volumes/hynixP41/llvm-project/slow_debug/include -I/Volumes/hynixP41/llvm-project/src/llvm/include /Volumes/hynixP41/llvm-project/src/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o RISCVTargetParserDef.inc -d RISCVTargetParserDef.inc.d && /Users/isaac/Applications/CLion.app/Contents/bin/cmake/mac/aarch64/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /Volumes/hynixP41/llvm-project/src/llvm /Volumes/hynixP41/llvm-project/src/llvm/include/llvm/TargetParser /Volumes/hynixP41/llvm-project/slow_debug /Volumes/hynixP41/llvm-project/slow_debug/include/llvm/TargetParser /Volumes/hynixP41/llvm-project/slow_debug/include/llvm/TargetParser/RISCVTargetParserDef.inc.d /Volumes/hynixP41/llvm-project/slow_debug/CMakeFiles/d/5923eeba9906073d4c3636bb2be0e5ca4a4d33dc57f0f2ac1497ab6f448443bd.d
/Volumes/hynixP41/llvm-project/src/llvm/lib/TableGen/Record.cpp:1567:41: runtime error: shift exponent 18446744073709551612 is too large for 64-bit type 'uint64_t' (aka 'unsigned long long')
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Volumes/hynixP41/llvm-project/src/llvm/lib/TableGen/Record.cpp:1567:41 
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /Volumes/hynixP41/llvm-project/slow_debug/bin/llvm-min-tblgen -gen-riscv-target-def -I/Volumes/hynixP41/llvm-project/src/llvm/include/llvm/TargetParser -I/Volumes/hynixP41/llvm-project/src/llvm/lib/Target/RISCV -I/Volumes/hynixP41/llvm-project/slow_debug/include -I/Volumes/hynixP41/llvm-project/src/llvm/include /Volumes/hynixP41/llvm-project/src/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o RISCVTargetParserDef.inc -d RISCVTargetParserDef.inc.d
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  libLLVMSupport.dylib               0x0000000101ad07f8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 284
1  libLLVMSupport.dylib               0x0000000101accf38 llvm::sys::RunSignalHandlers() + 136
2  libLLVMSupport.dylib               0x0000000101ad280c SignalHandler(int, __siginfo*, void*) + 328
3  libsystem_platform.dylib           0x000000018821d6a4 _sigtramp + 56
4  libsystem_pthread.dylib            0x00000001881e388c pthread_kill + 296
5  libsystem_c.dylib                  0x00000001880eca3c abort + 124
6  libclang_rt.asan_osx_dynamic.dylib 0x00000001022cdaa0 __sanitizer::Atexit(void (*)()) + 0
7  libclang_rt.asan_osx_dynamic.dylib 0x00000001022cd1c0 __sanitizer::Die() + 108
8  libclang_rt.asan_osx_dynamic.dylib 0x00000001022e1e54 __ubsan_handle_out_of_bounds + 0
9  libLLVMTableGen.dylib              0x000000010095fb2c llvm::BinOpInit::Fold(llvm::Record const*) const + 7928
10 libLLVMTableGen.dylib              0x00000001009629b4 llvm::BinOpInit::resolveReferences(llvm::Resolver&) const + 436
11 libLLVMTableGen.dylib              0x0000000100974574 llvm::CondOpInit::resolveReferences(llvm::Resolver&) const + 588
12 libLLVMTableGen.dylib              0x0000000100970754 llvm::Record::resolveReferences(llvm::Resolver&, llvm::RecordVal const*) + 624
13 libLLVMTableGen.dylib              0x000000010096fbcc llvm::VarDefInit::instantiate() + 1240
14 libLLVMTableGen.dylib              0x0000000100971ff0 llvm::VarDefInit::resolveReferences(llvm::Resolver&) const + 664
15 libLLVMTableGen.dylib              0x0000000100972f54 llvm::FieldInit::resolveReferences(llvm::Resolver&) const + 136
16 libLLVMTableGen.dylib              0x0000000100970754 llvm::Record::resolveReferences(llvm::Resolver&, llvm::RecordVal const*) + 624
17 libLLVMTableGen.dylib              0x000000010096fbcc llvm::VarDefInit::instantiate() + 1240
18 libLLVMTableGen.dylib              0x0000000100971ff0 llvm::VarDefInit::resolveReferences(llvm::Resolver&) const + 664
19 libLLVMTableGen.dylib              0x0000000100972f54 llvm::FieldInit::resolveReferences(llvm::Resolver&) const + 136
20 libLLVMTableGen.dylib              0x0000000100970754 llvm::Record::resolveReferences(llvm::Resolver&, llvm::RecordVal const*) + 624
21 libLLVMTableGen.dylib              0x00000001009e3928 llvm::TGParser::resolve(std::__1::vector<llvm::RecordsEntry, std::__1::allocator<llvm::RecordsEntry>> const&, llvm::SmallVector<std::__1::pair<llvm::Init const*, llvm::Init const*>, 8u>&, bool, std::__1::vector<llvm::RecordsEntry, std::__1::allocator<llvm::RecordsEntry>>*, llvm::SMLoc*) + 2168
22 libLLVMTableGen.dylib              0x00000001009e4a94 llvm::TGParser::resolve(llvm::ForeachLoop const&, llvm::SmallVector<std::__1::pair<llvm::Init const*, llvm::Init const*>, 8u>&, bool, std::__1::vector<llvm::RecordsEntry, std::__1::allocator<llvm::RecordsEntry>>*, llvm::SMLoc*) + 1092
23 libLLVMTableGen.dylib              0x00000001009e42a0 llvm::TGParser::addEntry(llvm::RecordsEntry) + 784
24 libLLVMTableGen.dylib              0x0000000100a044a8 llvm::TGParser::ParseForeach(llvm::MultiClass*) + 1064
25 libLLVMTableGen.dylib              0x0000000100a049e4 llvm::TGParser::ParseObject(llvm::MultiClass*) + 392
26 libLLVMTableGen.dylib              0x0000000100a03378 llvm::TGParser::ParseObjectList(llvm::MultiClass*) + 76
27 libLLVMTableGen.dylib              0x0000000100a070c0 llvm::TGParser::ParseTopLevelLet(llvm::MultiClass*) + 628
28 libLLVMTableGen.dylib              0x0000000100a04b6c llvm::TGParser::ParseObject(llvm::MultiClass*) + 784
29 libLLVMTableGen.dylib              0x0000000100a03378 llvm::TGParser::ParseObjectList(llvm::MultiClass*) + 76
30 libLLVMTableGen.dylib              0x0000000100a08d64 llvm::TGParser::ParseFile() + 228
31 libLLVMTableGen.dylib              0x0000000100935f4c llvm::TableGenMain(char const*, std::__1::function<bool (llvm::raw_ostream&, llvm::RecordKeeper const&)>) + 1412
32 llvm-min-tblgen                    0x00000001003b6bbc tblgen_main(int, char**) + 408
33 dyld                               0x0000000187e42b98 start + 6076
/bin/sh: line 1: 49448 Abort trap: 6           /Volumes/hynixP41/llvm-project/slow_debug/bin/llvm-min-tblgen -gen-riscv-target-def -I/Volumes/hynixP41/llvm-project/src/llvm/include/llvm/TargetParser -I/Volumes/hynixP41/llvm-project/src/llvm/lib/Target/RISCV -I/Volumes/hynixP41/llvm-project/slow_debug/include -I/Volumes/hynixP41/llvm-project/src/llvm/include /Volumes/hynixP41/llvm-project/src/llvm/lib/Target/RISCV/RISCV.td --write-if-changed -o RISCVTargetParserDef.inc -d RISCVTargetParserDef.inc.d

CMake Config:

-DCMAKE_CXX_FLAGS="-Os -march=native -fno-omit-frame-pointer -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG"
-DCMAKE_C_FLAGS="-Os -march=native -fno-omit-frame-pointer"
-DLLVM_CCACHE_BUILD:BOOL=ON
-DLLVM_CCACHE_MAXSIZE="500G"
-DLLVM_CCACHE_DIR="/Volumes/hynixP41/ccache"
-DBUILD_SHARED_LIBS:BOOL=ON
-DLLVM_ENABLE_EXPENSIVE_CHECKS:BOOL=ON
-DLLVM_USE_SANITIZER="Address;Undefined"
-DLLVM_OPTIMIZE_SANITIZED_BUILDS:BOOL=OFF
-DLLVM_UNREACHABLE_OPTIMIZE:BOOL=OFF
-DLLVM_ENABLE_IDE:BOOL=ON
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;mlir"
-DLLVM_TARGETS_TO_BUILD=host
-DLLVM_ENABLE_BINDINGS:BOOL=OFF

Using Apple clang version 17.0.0 (clang-1700.0.13.5)

Will try to reproduce with upstream clang.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions