From caa08d32dddf9a96c5255969baa4f6f07c5c6e0b Mon Sep 17 00:00:00 2001 From: Rot127 Date: Sat, 16 Dec 2023 08:59:48 -0500 Subject: [PATCH] Revert check for a set stackptr. stackptr is used in different ways: 1. Safes the offset from the stack frame base. 2. Is interpreted as somthing else for x86 and I cannot find out what, in a reasonably time. Hence we cannot use it here consistently. --- librz/analysis/var.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/librz/analysis/var.c b/librz/analysis/var.c index e644f92eba9..e463f754fef 100644 --- a/librz/analysis/var.c +++ b/librz/analysis/var.c @@ -1178,12 +1178,7 @@ static void extract_stack_var(RzAnalysis *analysis, RzAnalysisFunction *fcn, RzA RzStackAddr stack_off; if (is_sp) { - if (op->stackptr != RZ_ANALYSIS_OP_INVALID_STACKPTR) { - // If the stackptr is set we assume it is more correct and use it here. - stack_off = op->stackptr; - } else { - stack_off = addend - fcn->stack; - } + stack_off = addend - fcn->stack; } else { stack_off = addend - fcn->bp_off; }