<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/124912>124912</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[TySan] Can't build LLVM; many reports from llvm::cl::opt
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
gbMattN
</td>
</tr>
</table>
<pre>
When building clang with TySan, there are many runtime errors of the form
```
==15386==ERROR: TypeSanitizer: type-aliasing-violation on address 0x64ca90a27e18 (pc 0x64ca900c2ff1 bp 0x7ffcdb1ca690 sp 0x7ffcdb1c9e38 tid 15386)
READ of size 8 at 0x64ca90a27e18 with type p1 omnipotent char (in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > at offset 0) accesses part of an existing object of type llvm::cl::opt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > that starts at offset -160
#0 0x64ca900c2ff0 in llvm::cl::opt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, false, llvm::cl::parser<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>::~opt() (/home/gbmatt/Documents/upstream/llvm-project/build/bin/clang-tblgen+0x42dff0
```
These are _probably_ false positives, so it would be good to understand them
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzMVcGO2zgM_RrlQmQgS3FsH3xIJ5NTuwtMB7vHgLZpWwtZMiR6Julhv30hZzqdtnsuCkigQhIR3yP9hDGawRHVIv8g8uMGFx59qIfmEzL_sWl8d63_HslBsxjbGTdAa9EN8GJ4hKfrZ3RC3QOPFAgwEEzorhAWx2YioBB8iOD7lAC9D5OQB7GXr0sehD4KfcxyXe5vx4fHxz8fhT7A03Wmz-gMmy8UkoOvM23RGozGDdtn4y2y8Q68A-y6QDGCvOx3LVYSVUFZCUKVc_vmlK3q-wyaGeSl6Pu2a7IW95WE-N5TkS6BTQe3mlQl5OHx4XBMGKL5QlAC8o8XrVyk-mDOwE_OzJ7JMbQjhlSFcRC5E_og9OF8bi-XLLv9aDCa9hw5GDcIfZ_yE5tvyclx5oCG49ewfvguA631LbIP3-KQNjL4vo_EIIWqANuWYqQIM4YUAXRAFxM5NdQ3_1C7elcM1j5Pr9fbm_UzC33_iyGknB5tpHT4uaYZQ0yD8avLets8IkNkDBzfsb3N1rkGABBKy--nT4JxvwO9vye771bK-DfRoso0vas5jX4ioU5DMyGzUKejb5eJHEehTsscORBOQp0SmO0cfJppoU6rbCVrnFCnVbu23NiBnFAf5GWnur6XP6qSPDyNFG-Cdp6Db7Cx1_ONMJh9NGyeKa6APBiGF7_YDhqCwfsO2MPiOgqR0XVJ-aZNV-uu0hVuqM4KXWa5UoXcjHWZ5yqTSCqvZF_Kou_Krmx01Re97CpJG1MrqXKZqSpTcqflXYaF3lf5Dnc6qwrSYidpQmPvEu47H4aNiXGhOlO7KlMbiw3ZuIq7Uo5eYI0KpZLWh3olq1mGKHbSmsjx29-wYbu-CjeRz49wn7S-4NtLAB8__vVJ6A-vgk-zTx9CH_z0_xO-WYKtR-Y5Jpc6pU4aHpfmrvVf2_Zz99ZqU4Nf4TzX6r8AAAD__5KmFv4">