Skip to content

Instantly share code, notes, and snippets.

@agentzh

agentzh/a.patch Secret

Last active January 22, 2021 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agentzh/dfa06223ba9a1cbddf5990aa45bcdecc to your computer and use it in GitHub Desktop.
Save agentzh/dfa06223ba9a1cbddf5990aa45bcdecc to your computer and use it in GitHub Desktop.
dwarf expr deref fix
commit 42bb75c3a6fe643ad15bffd3f4c273eca4fff213
Author: Yichun Zhang (agentzh) <yichun@openresty.com>
Date: Thu Jan 21 21:29:32 2021 -0800
bugfix: unwinder: expr: DW_OP_push*: we forgot to push the result to the dwarf stack.
Most of the assembly routines in OpenSSL's libcrypto would produce unwinder failures
and the warning "WARNING: DWARF expression stack underflow in CFI" due to this bug.
diff --git a/runtime/unwind.c b/runtime/unwind.c
index a0ef6d8b5..9cae157af 100644
--- a/runtime/unwind.c
+++ b/runtime/unwind.c
@@ -1129,6 +1129,7 @@ static int compute_expr(const u8 *expr, struct unwind_frame_info *frame,
goto bad_deref_size;
}
}
+ PUSH(value);
break;
case DW_OP_rot:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment