Print hex dump of alloc on reading undef bytes

This commit is contained in:
David Cook 2020-04-21 21:28:22 -05:00
parent 8d9db57a0d
commit e37d0e3125

View File

@ -114,6 +114,9 @@ pub fn report_error<'tcx, 'mir>(
};
e.print_backtrace();
if let UndefinedBehavior(UndefinedBehaviorInfo::InvalidUndefBytes(Some(ptr))) = e.kind {
ecx.memory.dump_alloc(ptr.alloc_id);
}
let msg = e.to_string();
report_msg(ecx, &format!("{}: {}", title, msg), msg, helps, true)
}