Auto merge of #54254 - RalfJung:miri-dangling, r=eddyb
miri engine: keep around some information for dead allocations We use it to test if a dangling ptr is aligned and non-NULL. This makes some code pass that should pass (writing a ZST to a properly aligned dangling pointer), and makes some code fail that should fail (writing a ZST to a pointer obtained via pointer arithmetic from a real location, but ouf-of-bounds -- that pointer could be NULL, so we cannot allow writing to it). CTFE does not allow these operations; tests are added to miri with https://github.com/solson/miri/pull/453.
Showing
想要评论请 注册 或 登录