BoomerangDecompiler / boomerang

Boomerang Decompiler - Fighting the code-rot :)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CfgTest::testPlacePhi failures

reductor opened this issue · comments

There is currently failures within CfgTest::TestPlacePhi, this test is designed to test the CFG (Control Flow Graph). I have managed to isolate down the issue to a few things.

Most of it stems from DataFlow::placePhiFunctions failing to create the initial list A_org list, due to DataFlow::canRename returning false, there are a few reasons for this, most stemming from UserProc::isLocalOrParamPattern

The causes of this are:

  • The procedures signature is not promoted
  • Rename parameters is not true
  • The stack pointer from Signature::getStackRegister is ESP (r28) when the variable tested in EBP (r29)
  • initSp within UserProc::isLocalOrParamPattern is wrapped in RefExp which does not match the expression, when comparing with the left

There is more to the problem, even fixing these issues, the phi does not match, still yet to verify if the expected is what should really be expected.

The whole EBP/ESP problem will need to be handled better, maybe we should consider doing the same thing IDA seems to do - have some kind of analysis, but provide the User with an option of telling boomerang "this function is/isn't EBP based" ?
This will need a better framework for user interaction though.
The Boomerang is a target-rich environment :)

commented

This should be fixed in the current version.