From dacadc8a34722af1dd915147678277a9ed25fe1c Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Tue, 21 Apr 2020 15:18:59 -0700 Subject: [PATCH] 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. --- cranelift/codegen/src/isa/aarch64/inst/emit.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cranelift/codegen/src/isa/aarch64/inst/emit.rs b/cranelift/codegen/src/isa/aarch64/inst/emit.rs index a03da96f5f..b137ad3017 100644 --- a/cranelift/codegen/src/isa/aarch64/inst/emit.rs +++ b/cranelift/codegen/src/isa/aarch64/inst/emit.rs @@ -607,7 +607,7 @@ impl MachInstEmit for Inst { if let Some(srcloc) = srcloc { // Register the offset at which the actual load instruction starts. - sink.add_trap(srcloc, TrapCode::OutOfBounds); + sink.add_trap(srcloc, TrapCode::HeapOutOfBounds); } match &mem { @@ -741,7 +741,7 @@ impl MachInstEmit for Inst { if let Some(srcloc) = srcloc { // Register the offset at which the actual load instruction starts. - sink.add_trap(srcloc, TrapCode::OutOfBounds); + sink.add_trap(srcloc, TrapCode::HeapOutOfBounds); } match &mem {