about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorKai Luo <gluokai@gmail.com>2023-01-09 23:26:06 +0800
committerKai Luo <gluokai@gmail.com>2023-01-09 23:26:06 +0800
commit93ef4b3991d19cddf011da8f0b5a7bf9a8672541 (patch)
treeb81a93ea21822160d2c7fe0b9042afbdf00a5da4 /library/std/src
parentd4926eb8ab9c70ff25f38fc699f629e50b704770 (diff)
downloadrust-93ef4b3991d19cddf011da8f0b5a7bf9a8672541.tar.gz
rust-93ef4b3991d19cddf011da8f0b5a7bf9a8672541.zip
Add comment
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/personality/dwarf/eh.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/library/std/src/personality/dwarf/eh.rs b/library/std/src/personality/dwarf/eh.rs
index 4d114d61674..87585a8fcd0 100644
--- a/library/std/src/personality/dwarf/eh.rs
+++ b/library/std/src/personality/dwarf/eh.rs
@@ -131,10 +131,12 @@ unsafe fn interpret_cs_action(
     lpad: usize,
 ) -> EHAction {
     if cs_action_entry == 0 {
-        // If cs_action is 0 then this is a cleanup (Drop::drop). We run these
+        // If cs_action_entry is 0 then this is a cleanup (Drop::drop). We run these
         // for both Rust panics and foreign exceptions.
         EHAction::Cleanup(lpad)
     } else {
+        // If lpad != 0 and cs_action_entry != 0, we have to check ttype_index.
+        // If ttype_index == 0 under the condition, we take cleanup action.
         let action_record = (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();