Skip to content

Commit

Permalink
Corrected variables size
Browse files Browse the repository at this point in the history
  • Loading branch information
elicn committed Nov 20, 2019
1 parent 9367088 commit 81cf841
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions js/libcore2/frontend/arch/x86/analyzer.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,10 @@
var vdisp = vitem.disp;

if (vdisp === edisp) {
var vexpr = new Expr.AddrOf(new Expr.Var(vitem.name, size));
var p = expr.parent;
var vsize = (p instanceof Expr.Deref) ? p.size : size;

var vexpr = new Expr.AddrOf(new Expr.Var(vitem.name, vsize));

// TODO: this is an experimental method to identify arrays on stack and
// make their references show appropriately
Expand Down Expand Up @@ -348,7 +351,10 @@
// note: relevant for local variables only; arguments are expected to get exact match

if (vdisp >= edisp) {
var vexpr = new Expr.AddrOf(new Expr.Var(vitem.name, size));
var p = expr.parent;
var vsize = (p instanceof Expr.Deref) ? p.size : size;

var vexpr = new Expr.AddrOf(new Expr.Var(vitem.name, vsize));

// // TODO: this is an experimental method to identify arrays on stack and
// // make their references show appropriately
Expand Down

0 comments on commit 81cf841

Please sign in to comment.