Opened 2 years ago

Last modified 2 years ago

#362 new defect

a bug in class Decompiler_Binop for Decompiler.class.php

Reported by: qunxyz Owned by: moo
Priority: minor Milestone: undecided
Component: website Version: 3.2.0
Keywords: Cc:
Application: PHP Version:
Other Exts: SAPI: Others
Probability: Sometimes Blocked By:


method toCode:

if (is_a($this->op1, 'Decompiler_TriOp')
is_a($this->op1, 'Decompiler_Binop') && $this->op1->opc != $this->opc) {

$op1 = "(" . str($this->op1, $indent) . ")";

else {

$op1 = $this->op1;


if (is_a($this->op2, 'Decompiler_TriOp')
is_a($this->op2, 'Decompiler_Binop') && $this->op2->opc != $this->opc && substr($opstr, -1) != '=') {

$op2 = "(" . str($this->op2, $indent) . ")";

else {

$op2 = $this->op2;


There should caused a dead loop. Please change the "else" part like below:

the first else
else {

$op1 = str($this->op1, $indent);

the second else
else {

$op2 = str($this->op2, $indent);


Change History (6)

comment:1 Changed 2 years ago by moo

You code is not latest, please check against latest code and see if it can be reproduced

comment:2 Changed 2 years ago by qunxyz

latest code, I check out from svn

comment:3 Changed 2 years ago by moo

xcache code is migrated to git, the latest code is in git

comment:4 Changed 2 years ago by drakmor

On what URL you can get the latest source?

comment:5 Changed 2 years ago by moo

There's a repo url on top right corner

comment:6 Changed 2 years ago by qunxyz

hi, moo. the latest code still not working perfect, please check the line 2210, $rvalue not defined. Cause I got not much time, can't dig more info, sorry.maybe I can help after few days.

Note: See TracTickets for help on using tickets.