Make pointer::align_offset exploit allocation alignment #873
Labels
A-shims
Area: This affects the external function shims
C-enhancement
Category: a PR with an enhancement or an issue tracking an accepted enhancement
Miri's implementation of
align_offset
currently always says "nope, can't do that". We could do better than that in case the alignment of the allocation of the argument pointer is at least the requested alignment. In that case, we can basically run the real implementation ofalign_offset
from libcore.Testcase by @shepmaster:
There should also be another testcase where the modulo stuff becomes more interesting (
align_offset
returns an offset in units ofsize_of::<T>()
, not bytes).The text was updated successfully, but these errors were encountered: