aarch64/inst/unwind.rs: handle zero-length prologues correctly.
This commit is contained in:
committed by
julian-seward1
parent
19640367db
commit
cbce34af0a
@@ -102,7 +102,12 @@ impl UnwindInfoGenerator<Inst> for AArch64UnwindInfo {
|
|||||||
|
|
||||||
// TODO epilogues
|
// TODO epilogues
|
||||||
|
|
||||||
let prologue_size = context.insts_layout[context.prologue.end as usize - 1];
|
let prologue_size = if context.prologue.is_empty() {
|
||||||
|
0
|
||||||
|
} else {
|
||||||
|
context.insts_layout[context.prologue.end as usize - 1]
|
||||||
|
};
|
||||||
|
|
||||||
Ok(Some(UnwindInfo {
|
Ok(Some(UnwindInfo {
|
||||||
prologue_size,
|
prologue_size,
|
||||||
prologue_unwind_codes: codes,
|
prologue_unwind_codes: codes,
|
||||||
|
|||||||
Reference in New Issue
Block a user