Closed
Description
The Allocation
APIs should generally be avoided as they are low-level building blocks and don't do bounds or alignment checks themselves. I did an audit and noticed some uses crept in recently that are not properly checked:
-
getcwd
-
read
-
write
This can lead to ICEs. When these are fixed, a test should be added.
Cc @christianpoveda @oli-obk
It would be even better if we could stop exposing Memory::get
and Memory::get_mut
from librustc_mir
... once these issues are fixed and the current wave of PRs is in (I suggested to @christianpoveda to add a write_bytes
API anyway), we could try to make a concerted effort to remove the remaining uses in Miri.