Skip to content

Commit 93ef4b3

Browse files
committed
Add comment
1 parent d4926eb commit 93ef4b3

File tree

1 file changed

+3
-1
lines changed
  • library/std/src/personality/dwarf

1 file changed

+3
-1
lines changed

library/std/src/personality/dwarf/eh.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,12 @@ unsafe fn interpret_cs_action(
131131
lpad: usize,
132132
) -> EHAction {
133133
if cs_action_entry == 0 {
134-
// If cs_action is 0 then this is a cleanup (Drop::drop). We run these
134+
// If cs_action_entry is 0 then this is a cleanup (Drop::drop). We run these
135135
// for both Rust panics and foreign exceptions.
136136
EHAction::Cleanup(lpad)
137137
} else {
138+
// If lpad != 0 and cs_action_entry != 0, we have to check ttype_index.
139+
// If ttype_index == 0 under the condition, we take cleanup action.
138140
let action_record = (action_table as *mut u8).offset(cs_action_entry as isize - 1);
139141
let mut action_reader = DwarfReader::new(action_record);
140142
let ttype_index = action_reader.read_sleb128();

0 commit comments

Comments
 (0)