Rollup merge of #99932 - madsmtm:fix-unwinding-debug-assertions, r=Amanieu
Fix unwinding on certain platforms when debug assertions are enabled This came up on `armv7-apple-ios` when using `-Zbuild-std`. Looks like this is a leftover from a [conversion from C to Rust](051c2d14fb1e73866376668088971605d38f0c65), where integer wrapping is implicit. Not at all sure how the unwinding code works!
This commit is contained in:
commit
c98e893bad
@ -306,7 +306,9 @@ unsafe fn find_eh_action(context: *mut uw::_Unwind_Context) -> Result<EHAction,
|
||||
let eh_context = EHContext {
|
||||
// The return address points 1 byte past the call instruction,
|
||||
// which could be in the next IP range in LSDA range table.
|
||||
ip: if ip_before_instr != 0 { ip } else { ip - 1 },
|
||||
//
|
||||
// `ip = -1` has special meaning, so use wrapping sub to allow for that
|
||||
ip: if ip_before_instr != 0 { ip } else { ip.wrapping_sub(1) },
|
||||
func_start: uw::_Unwind_GetRegionStart(context),
|
||||
get_text_start: &|| uw::_Unwind_GetTextRelBase(context),
|
||||
get_data_start: &|| uw::_Unwind_GetDataRelBase(context),
|
||||
|
Loading…
x
Reference in New Issue
Block a user