Fix aarch64 load trap info: HeapOutOfBounds, not OutOfBounds.

This halfway solves a test failure: when temporarily disabling another
assert that is triggered by lack of debug info, this causes the
`custom_trap_handler` test to pass.
This commit is contained in:
Chris Fallin
2020-04-21 15:18:59 -07:00
parent 7b24ff15db
commit dacadc8a34

View File

@@ -607,7 +607,7 @@ impl<O: MachSectionOutput> MachInstEmit<O> for Inst {
if let Some(srcloc) = srcloc { if let Some(srcloc) = srcloc {
// Register the offset at which the actual load instruction starts. // Register the offset at which the actual load instruction starts.
sink.add_trap(srcloc, TrapCode::OutOfBounds); sink.add_trap(srcloc, TrapCode::HeapOutOfBounds);
} }
match &mem { match &mem {
@@ -741,7 +741,7 @@ impl<O: MachSectionOutput> MachInstEmit<O> for Inst {
if let Some(srcloc) = srcloc { if let Some(srcloc) = srcloc {
// Register the offset at which the actual load instruction starts. // Register the offset at which the actual load instruction starts.
sink.add_trap(srcloc, TrapCode::OutOfBounds); sink.add_trap(srcloc, TrapCode::HeapOutOfBounds);
} }
match &mem { match &mem {