<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/151831>151831</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
TableGen/Record.cpp:1567:41: runtime error: shift exponent 18446744073709551612 is too large for 64-bit type 'uint64_t' (aka 'unsigned long long')
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
nuudlman
</td>
</tr>
</table>
<pre>
commit 8e9e38acc8ff4c3bcae74e85a65e49994726478
**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.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzsWl9v2zgS_zTKC2GDIvX3IQ-yLSe-df4gTnLdvggURdncSqRAUWlzn_5Aym7lOm7i7Pb2Fmhg1LRIzvw485sZiixpW74WjJ07_sTxZ2ek0xupzkXXFVVNxFkui-dzKuuaaxCxmOGIUBqVpUdxTgkLPRb5JPCZF8exF6LACyMHJuaDzGdC6CetCGX9TwfbrgBuPzChBXDQ_FFWXc1aB803z4J_ufVcB82r6qkeNUr-wah20Lyt5OesYHm3dtCcC1p1BduOctD8nqg107dEtUwBBwUOCt4lOOdiN6LmYqTzas0EGK2ZGCne0qeRtopGBSvBaPFWDYp-Q_pj6O-TWfH8qyAHze8Wq-njCaJesOyfW9ybTf_aInbfY12A0eiz4pqNeDmiGyLWrAAjCWz30IQzVo65oGBUHO0bFwOKPLRMGZS8JcSgSZqm4pRoLoV5PF1yKcakaUxbCs2Ebr_yhNbkk_FkbWcSougm8PZ7wSgFtpFpRURbSlVnBWtKXjFwzcUfBKwp3T042WzvMvRrwXMiaX5KAP_FEnc8OkaG09VNr8gnNueVnVM4aO7HCDOWkziGAQxx4VEc4CDPUc4g8ynxiFdgXFA_LGGJCHW9OCR5UHpe5Hk4L8aFzZrvj5u8YhfM8O6OUamKMW0aByeuH4QOTjzXwQlQndC8ZoApJZV50G54qQH70kjBhAZu5HlB6HkwxCGMfd8NXAR4C7SUoDKmA6VUIPBGOddAPzeGsWHHhQ68TDsoB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