Uploaded image for project: 'Byteman'
  1. Byteman
  2. BYTEMAN-111

AT ENTRY rules injected into methods starting with a while loop can end up inside the while

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.3.0
    • 1.2.2.1
    • Trigger Injection
    • None

      When an AT ENTRY rule is injected into a method which begins with a while loop the injected code can end up inside the loop. causing them to trigger at each loop iteration. The problem is that the loop label may be visited before the first instruction in the loop and trigger code is only added when an instruction is reached. So, the GOTO which returns to the label will return to a label preceding the trigger code. The trigger code should be injected when the code is visited (i.e. at the call to visitCode ) so it precedes the visit to the while label.

      n.b. this will have the unfortunate side effect that the trigger code will be injected before any visitLine instruction causing stack traces to list the line number for the trigger frame as -1.

              rhn-engineering-adinn Andrew Dinn
              rhn-engineering-adinn Andrew Dinn
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: