rustup
This commit is contained in:
parent
b0e5d5f1ef
commit
c151af5cf5
@ -1 +1 @@
|
||||
3e827cc21e0734edd26170e8d1481f0d66a1426b
|
||||
35bab923c8e5a1e8291735e7630539002eb80d7b
|
||||
|
@ -508,14 +508,14 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
|
||||
#[inline(always)]
|
||||
fn memory_read(
|
||||
_memory_extra: &Self::MemoryExtra,
|
||||
alloc: &Allocation<Tag, AllocExtra>,
|
||||
alloc_extra: &AllocExtra,
|
||||
ptr: Pointer<Tag>,
|
||||
size: Size,
|
||||
) -> InterpResult<'tcx> {
|
||||
if let Some(data_race) = &alloc.extra.data_race {
|
||||
if let Some(data_race) = &alloc_extra.data_race {
|
||||
data_race.read(ptr, size)?;
|
||||
}
|
||||
if let Some(stacked_borrows) = &alloc.extra.stacked_borrows {
|
||||
if let Some(stacked_borrows) = &alloc_extra.stacked_borrows {
|
||||
stacked_borrows.memory_read(ptr, size)
|
||||
} else {
|
||||
Ok(())
|
||||
@ -525,14 +525,14 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
|
||||
#[inline(always)]
|
||||
fn memory_written(
|
||||
_memory_extra: &mut Self::MemoryExtra,
|
||||
alloc: &mut Allocation<Tag, AllocExtra>,
|
||||
alloc_extra: &mut AllocExtra,
|
||||
ptr: Pointer<Tag>,
|
||||
size: Size,
|
||||
) -> InterpResult<'tcx> {
|
||||
if let Some(data_race) = &mut alloc.extra.data_race {
|
||||
if let Some(data_race) = &mut alloc_extra.data_race {
|
||||
data_race.write(ptr, size)?;
|
||||
}
|
||||
if let Some(stacked_borrows) = &mut alloc.extra.stacked_borrows {
|
||||
if let Some(stacked_borrows) = &mut alloc_extra.stacked_borrows {
|
||||
stacked_borrows.memory_written(ptr, size)
|
||||
} else {
|
||||
Ok(())
|
||||
@ -542,17 +542,17 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
|
||||
#[inline(always)]
|
||||
fn memory_deallocated(
|
||||
memory_extra: &mut Self::MemoryExtra,
|
||||
alloc: &mut Allocation<Tag, AllocExtra>,
|
||||
alloc_extra: &mut AllocExtra,
|
||||
ptr: Pointer<Tag>,
|
||||
size: Size,
|
||||
) -> InterpResult<'tcx> {
|
||||
let size = alloc.size();
|
||||
if Some(ptr.alloc_id) == memory_extra.tracked_alloc_id {
|
||||
register_diagnostic(NonHaltingDiagnostic::FreedAlloc(ptr.alloc_id));
|
||||
}
|
||||
if let Some(data_race) = &mut alloc.extra.data_race {
|
||||
if let Some(data_race) = &mut alloc_extra.data_race {
|
||||
data_race.deallocate(ptr, size)?;
|
||||
}
|
||||
if let Some(stacked_borrows) = &mut alloc.extra.stacked_borrows {
|
||||
if let Some(stacked_borrows) = &mut alloc_extra.stacked_borrows {
|
||||
stacked_borrows.memory_deallocated(ptr, size)
|
||||
} else {
|
||||
Ok(())
|
||||
|
Loading…
x
Reference in New Issue
Block a user