<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/55729>55729</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
`kCfiShadowLimitStorageSize` page size value can be incorrect and cause a runtime assertion failure
</td>
</tr>
<tr>
<th>Labels</th>
<td>
compiler-rt,
crash
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tbaederr
</td>
</tr>
</table>
<pre>
In `compiler-rt/lib/cfi/cfi.cpp`:
https://github.com/llvm/llvm-project/blob/827fa2c419617b40b639995ccfd43896cefd4a3c/compiler-rt/lib/cfi/cfi.cpp#L54
Which then later is asserted to be equal to the actual page size read via `getpagesize()`:
https://github.com/llvm/llvm-project/blob/827fa2c419617b40b639995ccfd43896cefd4a3c/compiler-rt/lib/cfi/cfi.cpp#L195
So, if `getpagesize()` ever returns a value other than `4096`, this assertion will fail at runtime.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzNUrlu3DAQ_RqqISxI1MlChWPDQAB3W6QeUiOJCVdUeKyRfH2Gu3DsFEGQzoAwmoOcefMelZt_TJ93zvpKu_NhLPo7H5l4skaR1Yu52VIfB51hzT2rHll1v8V4hByJJ_pWE7ekSuqQb9rL6-_u8O4r6txPWZcbjmJYQOi2ln09qLZSfSOl7LRe5rYZZa-RHGh0nvpPPKJ57tobnpv9shm98bjhzi1E9NwEDiGgjzjz6LhCjt8T2OzTKQ465uiAFXkwP5F7hJlfDGQ-Voy5kPNMjEzIj7h_Lbv3BJwcEw_cLH_Dz_FCrHiMye9EDb-ATcgdceGJELi-g7aSfV6VGsXtN4HG7fzFWMsXMJZD5D7t0ZyxLOapmWUjoYgmWpzo6reHxZw2mN3LszmbeIrOE5BTBkIQ3ti-Tdc0loQxu3beE1kc9pmSKZA-r1Pegcjzk8cieTv9twomhISBnK4bhCy2adAam0UKpceKBFAj9qNUY18NUsNYQ2FBoQ0T6z4xIf6QRGSGctJD2HLYPRZmEpUQVScG6kZuOeimhlYtSpOso65ZW-GZNigzsNL5tfDTFaNKa6CiNSGGtyKtbdYd8Tqf-kOKm_NTVIAzel9c95muy_wCNTc1iA">