Byteman
  1. Byteman
  2. BYTEMAN-197

Byteman fails on code generated by ECJ

    Details

    • Type: Bug Bug
    • Status: Open Open (View Workflow)
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.0
    • Fix Version/s: None
    • Component/s: Trigger Injection
    • Labels:
      None
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Don't use Byteman with bytecode generated by ECJ (yes, lame but ...)

      Show
      Don't use Byteman with bytecode generated by ECJ (yes, lame but ...)
    • Similar Issues:
      Show 10 results 

      Description

      Byteman's code analysis is doen on a single pass through method byteocde. So, it relies on propagating constraints through the bytecode as instructions are visited. This assumes that control flow into each basic block primarily involves forward flow through i.e. every basic block will always be entered via a forward jump or exception transfer before it can be re-entered via a backward jump. If this assumption is met then blocks can be visited by the analyzer before all their constraints can be posted.

      Unfortunately, the ECJ compiler appears to compile loops with a forward jump over the loop body to the loop test code followed by a backward conditional jump to the start of the loop body. This means Byteman cannot always propagate monitorenter constraints to the loop start during bytecode analysis and hecne that it can lose track of the enter constraint when it encounters a subsequent monitorexit. Result = null pointer exception for the (missing in action) reference to the monitorenter.

      This will be a real pig to fix since it is deep in the guts of Byteman and the one-pass assumption is key to doing injection relatively eficiently.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Andrew Dinn
            Reporter:
            Anton Ryabtsev
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: