<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/78923>78923</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
CLang 16 crashed compiling C++ project
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Enmk
</td>
</tr>
</table>
<pre>
Was building some C++ code on my Ubuntu 22.04 box and saw th
```
[build] [1/2 0% :: 0.000] Re-checking globbed directories...
[build] [1/2 50% :: 0.009] cd /home/nemkov/.builds/vs_ClickHouse-replace-partition-Clang_16.0.6-Debug/contrib/avro-cmake && /usr/bin/cmake -E make_directory /home/nemkov/.builds/vs_ClickHouse-replace-partition-Clang_16.0.6-Debug/contrib/avro-cmake/include && /usr/bin/cmake -E create_symlink /home/nemkov/ClickHouse-replace-partition/contrib/avro/lang/c++/api /home/nemkov/.builds/vs_ClickHouse-replace-partition-Clang_16.0.6-Debug/contrib/avro-cmake/include/avro
[build] [2/2 100% :: 10.649] Linking CXX executable src/unit_tests_dbms
[build] FAILED: src/unit_tests_dbms
[build] : && /usr/bin/clang++-16 --target=x86_64-linux-gnu --sysroot=/home/nemkov/ClickHouse-replace-partition/cmake/linux/../../contrib/sysroot/linux-x86_64/x86_64-linux-gnu/libc --gcc-toolchain=/home/nemkov/ClickHouse-replace-partition/cmake/linux/../../contrib/sysroot/linux-x86_64 -std=c++20 -fdiagnostics-color=always -Xclang -fuse-ctor-homing -Wno-enum-constexpr-conversion -fsized-deallocation -gdwarf-aranges -pipe -mssse3 -msse4.1 -msse4.2 -mpclmul -mpopcnt -fasynchronous-unwind-tables -falign-functions=32 -mbranches-within-32B-boundaries -fdiagnostics-absolute-paths -fstrict-vtable-pointers -Wall -Wextra -Weverything -Wpedantic -Wno-zero-length-array -Wno-c++98-compat-pedantic -Wno-c++98-compat -Wno-c++20-compat -Wno-sign-conversion -Wno-implicit-int-conversion -Wno-implicit-int-float-conversion -Wno-ctad-maybe-unsupported -Wno-disabled-macro-expansion -Wno-documentation-unknown-command -Wno-double-promotion -Wno-exit-time-destructors -Wno-float-equal -Wno-global-constructors -Wno-missing-prototypes -Wno-missing-variable-declarations -Wno-padded -Wno-switch-enum -Wno-undefined-func-template -Wno-unused-template -Wno-vla -Wno-weak-template-vtables -Wno-weak-vtables -Wno-thread-safety-negative -Wno-enum-constexpr-conversion -Wno-unsafe-buffer-usage -g -O0 -g -gdwarf-4 -D_LIBCPP_DEBUG=0 --gcc-toolchain=/home/nemkov/ClickHouse-replace-partition/cmake/linux/../../contrib/sysroot/linux-x86_64 --ld-path=/usr/bin/ld.lld-16 -Wl,--no-export-dynamic -Wl,--gdb-index -Wl,--build-id=sha1 -no-pie -Wl,-no-pie -Xlinker --no-undefined @CMakeFiles/unit_tests_dbms.rsp -o src/unit_tests_dbms && :
[build] PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
[build] 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):
[build] 0 libLLVM-16.so.1 0x00007f318ba8b706 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 54
[build] 1 libLLVM-16.so.1 0x00007f318ba898a0 llvm::sys::RunSignalHandlers() + 80
[build] 2 libLLVM-16.so.1 0x00007f318ba8bedb
[build] 3 libc.so.6 0x00007f318a5b1520
[build] 4 libc.so.6 0x00007f318a70f8c6
[build] 5 libLLVM-16.so.1 0x00007f318cfd0e58 llvm::StringTableBuilder::write(unsigned char*) const + 136
[build] 6 libLLVM-16.so.1 0x00007f318ba1133c
[build] 7 libLLVM-16.so.1 0x00007f318ba0f8f0 llvm::parallelFor(unsigned long, unsigned long, llvm::function_ref<void (unsigned long)>) + 240
[build] 8 ld.lld-16 0x0000560ee0855c3e lld::elf::MergeNoTailSection::writeTo(unsigned char*) + 62
[build] 9 ld.lld-16 0x0000560ee082af66
[build] 10 libLLVM-16.so.1 0x00007f318ba11225
[build] 11 libLLVM-16.so.1 0x00007f318ba106f4
[build] 12 libstdc++.so.6 0x00007f318a97d253
[build] 13 libc.so.6 0x00007f318a603ac3
[build] 14 libc.so.6 0x00007f318a695850
[build] clang: error: unable to execute command: Bus error (core dumped)
[build] clang: error: linker command failed due to signal (use -v to see invocation)
[build] ninja: build stopped: subcommand failed.
[proc] The command: /usr/bin/cmake --build /home/nemkov/.builds/vs_ClickHouse-replace-partition-Clang_16.0.6-Debug --config Debug --target unit_tests_dbms -- exited with code: 1
[driver] Build completed: 00:00:11.376
[build] Build finished with exit code 1
```
Environment details:
```
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.2 LTS"
$ /usr/bin/ld.lld-16 --version
Ubuntu LLD 16.0.6 (compatible with GNU linkers)
$ /usr/bin/clang++-16 --version
Ubuntu clang version 16.0.6 (++20230710042027+7cbf1a259152-1~exp1~20230710162048.105)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEWE9z6ygS_zTkQuFCyJLtQw5OHM-kKu9PvWT2vd2LC0FLZoJAC8iJ5zCffQtkJ3bsvGxNbc2mUpbUTXf_aBq6G-69agzAJSquULG44H1YW3d5Y9rHi8rK7eV37nHVKy2VabC3LeBrxK4Qu8LCSsDW4HaLf6t6E3rM2IiOcWWfMTcSe_6EwxrRBaJzVNLd__BZXCWdqFhgVFxliC0ZxpgiVmCUz1E-x3REKY38b0DEGsRjtN9oW1UgsVQORLBOgR-NRj_TWbzVOYt8ITFiy7VtAbGlgfbRbhBbjpK8R2y58atrrcTjr7b3QBx0mgsgHXdBBWUNudbcNKusHNFRSRZQ9Q1iS2FNcKpCbMk3zhLR8kfAiJWIldFa7x1iy0qZODTxyA2Oz9V-Ntu_CRRiS2WE7uWH8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