simd_shl
and simd_shr
don't check overflow cases
#1963
Labels
[E] Unsupported UB
Undefined behavior that Kani does not detect
Both
simd_shl
andsimd_shr
are missing an overflow check that is done for the regular bit-shift operators (i.e.,<<
and>>
). Consider this example:This is the verification output for
test_normal
:This is the verification output for
test_simd
:In diffblue/cbmc#7362 I asked the CBMC about this missing check, but it turns out these checks are being generated by MIR! It's not clear to me if they're necessary, as some overflow cases overlap with the "shift is too large" cases, for example. It's also unclear how to include them for SIMD intrinsics.
The text was updated successfully, but these errors were encountered: