Add slice op soundness tests#220
Conversation
|
Instead of doing this unwinding thing, can we not simply change the |
|
We could, but that makes the proc macro even more complex and magical, and I'm trying to keep things simple and stupid to make them easier to maintain in the long run. This already uses a macro to reduce duplication so I felt I've already spent all the complexity budget. Plus I didn't expect this to be used often (there are literally two methods where this is even needed) so I didn't think it was worth complicating the common path for the sake of this. |
|
I've heard that |
The vast majority of our operations accept fixed-size inputs with the lengths encoded in type system, so they are pretty hard to mess up. We also have Address Sanitizer on CI verifying that all the raw intrinsics actually stick to those sizes.
The only exception are from_slice/store_slice APIs, which accept variable-length slices. This PR adds tests verifying that slices that are too short are correctly rejected.