File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
library/std/src/personality/dwarf Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -121,13 +121,21 @@ pub unsafe fn find_eh_action(lsda: *const u8, context: &EHContext<'_>) -> Result
121
121
let mut idx = ip;
122
122
loop {
123
123
let cs_lpad = reader. read_uleb128 ( ) ;
124
- let cs_action = reader. read_uleb128 ( ) ;
124
+ let cs_action_entry = reader. read_uleb128 ( ) ;
125
125
idx -= 1 ;
126
126
if idx == 0 {
127
127
// Can never have null landing pad for sjlj -- that would have
128
128
// been indicated by a -1 call site index.
129
129
let lpad = ( cs_lpad + 1 ) as usize ;
130
- return Ok ( interpret_cs_action ( cs_action, lpad) ) ;
130
+ if cs_action_entry == 0 {
131
+ return Ok ( interpret_cs_action ( 0 , lpad) ) ;
132
+ } else {
133
+ let action_record =
134
+ ( action_table as * mut u8 ) . offset ( cs_action_entry as isize - 1 ) ;
135
+ let mut action_reader = DwarfReader :: new ( action_record) ;
136
+ let ttype_index = action_reader. read_sleb128 ( ) ;
137
+ return Ok ( interpret_cs_action ( ttype_index as u64 , lpad) ) ;
138
+ }
131
139
}
132
140
}
133
141
}
You can’t perform that action at this time.
0 commit comments