Skip to content

Commit 8333e5c

Browse files
committed
Add comments
1 parent 04a6975 commit 8333e5c

File tree

1 file changed

+2
-0
lines changed
  • library/std/src/personality/dwarf

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ pub unsafe fn find_eh_action(lsda: *const u8, context: &EHContext<'_>) -> Result
102102
(action_table as *mut u8).offset(cs_action_entry as isize - 1);
103103
let mut action_reader = DwarfReader::new(action_record);
104104
let ttype_index = action_reader.read_sleb128();
105+
// Normally, if ttype_index < 0, meaning the catch type is exception specification.
106+
// Since we only care about if ttype_index is zero, so casting ttype_index to u64 makes sense.
105107
return Ok(interpret_cs_action(ttype_index as u64, lpad));
106108
}
107109
}

0 commit comments

Comments
 (0)