Skip to content

Commit 245a7c8

Browse files
authored
Rollup merge of #138713 - RalfJung:memory-hook-pointers, r=oli-obk
interpret memory access hooks: also pass through the Pointer used for the access In some ongoing work on the Miri side, we need the absolute address that the memory access occurred at. That is non-trivial to obtain since we don't have an `ecx`. So pass through the `Pointer` used for the access, which contains the address, and which is available everywhere we are calling these hooks. r? `@oli-obk`
2 parents 52dbfe6 + b05fe3b commit 245a7c8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/machine.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,6 +1366,7 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
13661366
_tcx: TyCtxtAt<'tcx>,
13671367
machine: &Self,
13681368
alloc_extra: &AllocExtra<'tcx>,
1369+
_ptr: Pointer,
13691370
(alloc_id, prov_extra): (AllocId, Self::ProvenanceExtra),
13701371
range: AllocRange,
13711372
) -> InterpResult<'tcx> {
@@ -1390,6 +1391,7 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
13901391
_tcx: TyCtxtAt<'tcx>,
13911392
machine: &mut Self,
13921393
alloc_extra: &mut AllocExtra<'tcx>,
1394+
_ptr: Pointer,
13931395
(alloc_id, prov_extra): (AllocId, Self::ProvenanceExtra),
13941396
range: AllocRange,
13951397
) -> InterpResult<'tcx> {
@@ -1414,6 +1416,7 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
14141416
_tcx: TyCtxtAt<'tcx>,
14151417
machine: &mut Self,
14161418
alloc_extra: &mut AllocExtra<'tcx>,
1419+
_ptr: Pointer,
14171420
(alloc_id, prove_extra): (AllocId, Self::ProvenanceExtra),
14181421
size: Size,
14191422
align: Align,

0 commit comments

Comments
 (0)