libdrgn: dwarf_info: fix crash after DW_CFA_restore_state

I botched DW_CFA_restore_state when converting to the new vector API.

Fixes: d1a6350bdd ("libdrgn: revamp generic vector API")
Reported-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Signed-off-by: Omar Sandoval <osandov@osandov.com>
This commit is contained in:
Omar Sandoval 2023-08-18 14:19:48 -07:00
parent 3bd0c37177
commit a657c841d0

View File

@ -7087,8 +7087,7 @@ set_reg:
goto out; goto out;
} }
drgn_cfi_row_destroy(*row); drgn_cfi_row_destroy(*row);
drgn_cfi_row_vector_pop(&state_stack); *row = *drgn_cfi_row_vector_pop(&state_stack);
*row = *drgn_cfi_row_vector_last(&state_stack);
break; break;
case DW_CFA_nop: case DW_CFA_nop:
break; break;