explain why we catch PointerUseAfterFree
This commit is contained in:
parent
2764d3d3e4
commit
3e61442905
1 changed files with 2 additions and 0 deletions
|
|
@ -380,6 +380,8 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, 'tcx, M
|
|||
),
|
||||
self.path
|
||||
),
|
||||
// This cannot happen during const-eval (because interning already detects
|
||||
// dangling pointers), but it can happen in Miri.
|
||||
err_ub!(PointerUseAfterFree(_)) => throw_validation_failure!(
|
||||
format_args!("a dangling {} (use-after-free)", kind),
|
||||
self.path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue