<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/119040>119040</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Sanitizers do not catch out-of-bounds pointer arithmetic
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
davidben
</td>
</tr>
</table>
<pre>
Pointer arithmetic is required to stay in bounds, even if you don't use the pointer, but (as far as I can tell), Clang has no sanitizer that catches this. See https://godbolt.org/z/PE6P31fcq
I'm guessing ASan would have the easiest time catching this, since it knows where all the allocations are?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxcksFu2zwQhJ-GuixsUJQsWQcd_OevgNwC5AmW4lpiS5MJd2kjefpCdoIWPfHA2Z3hfERmv0SiUR3-U4f_Kyyypjw6vHpnKVY2uY_xJfkolAGzl_VC4mfwDJnei8_kQBKw4Af4CDaV6FiZJ6ArRfBn-EgFXIrK9AKFCWQleHvs22S2CChzRIYzZkCGZ5gxglAIygyb4ilgXGBFhpiAMXrxn5RBVhSYUeaVGGT1vIdXIlhF3lg1J2UmZaYlOZuC7FNelJk-lZlefnQvTX2e35U-KX16Vqa_wFKI2ccFTq8Y4ZZKcLDi9RGWkD2xgPgLPQw35ea4pWMfZwIv8CumG8NtpUyAIdxHMYQ0o_gUGTCTaqbKjY0bmgErGuu-aQ6mG7pjtY6un8-kD_rgdN8Pc1tTR3juOntsbGubofKj0aatje5MU3f6uD-4ridtu0Nt60a3rWo1XdCHfQjXy_biyjMXGut60K2uAloKfMdsTKQb3G-VMRv1PG5DO1sWVq0OnoX_rBEvgcbX7-YZXIKYvsqHVGSXzrsH-G-yf_2UquQw_kPFy1rsfk4XZabN5uvYveX0k2ZRZrqHY2Wmr_TX0fwOAAD__62h4lY">