diff options
| author | Kai Luo <gluokai@gmail.com> | 2023-01-09 23:09:18 +0800 |
|---|---|---|
| committer | Kai Luo <gluokai@gmail.com> | 2023-01-09 23:09:18 +0800 |
| commit | 8333e5cf5e4a37852774993a5a2398c8a0891239 (patch) | |
| tree | b2f1074e479bd9fdc63547f77e133c55040da60d /library/std/src | |
| parent | 04a697502fbb3a69fe5dbeb0b3babf6f1e67711f (diff) | |
Add comments
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/personality/dwarf/eh.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/personality/dwarf/eh.rs b/library/std/src/personality/dwarf/eh.rs index 1e71da95a30..4a98c36f42c 100644 --- a/library/std/src/personality/dwarf/eh.rs +++ b/library/std/src/personality/dwarf/eh.rs @@ -102,6 +102,8 @@ pub unsafe fn find_eh_action(lsda: *const u8, context: &EHContext<'_>) -> Result (action_table as *mut u8).offset(cs_action_entry as isize - 1); let mut action_reader = DwarfReader::new(action_record); let ttype_index = action_reader.read_sleb128(); + // Normally, if ttype_index < 0, meaning the catch type is exception specification. + // Since we only care about if ttype_index is zero, so casting ttype_index to u64 makes sense. return Ok(interpret_cs_action(ttype_index as u64, lpad)); } } |
