From 6f67a5503615bbc0b481f29991d717b84a0bcd78 Mon Sep 17 00:00:00 2001 From: Fabrice Desclaux Date: Thu, 21 Feb 2019 07:24:25 +0100 Subject: stack2var: move it from simplification loop to final pass There are no points to call it in the simplification loop as it's hypothesis is that we uncover all stack accesses. Moreover, the index variable generated will collide with previous calls --- example/disasm/full.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'example') diff --git a/example/disasm/full.py b/example/disasm/full.py index 19036882..5161a299 100644 --- a/example/disasm/full.py +++ b/example/disasm/full.py @@ -330,9 +330,20 @@ if args.propagexpr: modified = super(CustomIRCFGSimplifierSSA, self).do_simplify(ssa, head) if args.loadint: modified |= load_from_int(ssa.graph, bs, is_addr_ro_variable) + + def simplify(self, ircfg, head): + ssa = self.ircfg_to_ssa(ircfg, head) + ssa = self.do_simplify_loop(ssa, head) + ircfg = self.ssa_to_unssa(ssa, head) + if args.stack2var: - modified |= replace_stack_vars(self.ir_arch, ssa) - return modified + replace_stack_vars(self.ir_arch, ircfg) + + ircfg_simplifier = IRCFGSimplifierCommon(self.ir_arch) + ircfg_simplifier.simplify(ircfg, head) + return ircfg + + head = list(entry_points)[0] -- cgit 1.4.1