Skip to content

Commit

Permalink
libdrgn: dwarf_info: fix crash after DW_CFA_restore_state
Browse files Browse the repository at this point in the history
I botched DW_CFA_restore_state when converting to the new vector API.

Fixes: d1a6350 ("libdrgn: revamp generic vector API")
Reported-by: Serapheim Dimitropoulos <[email protected]>
Signed-off-by: Omar Sandoval <[email protected]>
  • Loading branch information
osandov committed Aug 18, 2023
1 parent 3bd0c37 commit a657c84
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libdrgn/dwarf_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -7087,8 +7087,7 @@ drgn_eval_dwarf_cfi(struct drgn_elf_file *file, enum drgn_section_index scn,
goto out;
}
drgn_cfi_row_destroy(*row);
drgn_cfi_row_vector_pop(&state_stack);
*row = *drgn_cfi_row_vector_last(&state_stack);
*row = *drgn_cfi_row_vector_pop(&state_stack);
break;
case DW_CFA_nop:
break;
Expand Down

0 comments on commit a657c84

Please sign in to comment.