BoomerangDecompiler / boomerang

Boomerang Decompiler - Fighting the code-rot :)
Other
374 stars 59 forks source link

Potential crash when replacing Phi by Assign #250

Closed ceeac closed 5 years ago

ceeac commented 5 years ago

The code in PhiAssign::convertToAssign (Cf. #23) is currently less than ideal. Constructing the Assign in-place may cause crashes if other code still holds a pointer to the phi. Therefore, the code should be refactored/fixed to replace the statement (not in-place). References to the old Phi (subscripts, RHSes of other Phis, collectors) also need to be replaced to point to the new Assign.

Solving this is a prerequisite for using smart pointers for managing the lifetime of Statements (also #23)