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

AT LINE rules are injected multiple times

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.4.1
    • 1.4.0
    • Trigger Injection
    • None

      Rules using an AT LINE location are correctly injected at the specified line. However, they are then wrongly injected at each successive line which lies within the trigger method. This is a regression introduced into the line location trigger injection code. The visitLine method fails to set a flag the first time the rule is successfully injected. Subsequent visitLine calls test the flag and because it has not been set continue to inject trigger code. The obvious result is that the rule gets called more times than it should. A more subtle problem occurs when the rule includes reference to local variables in scope at the original trigger point. The variable may no longer be in scope at the later trigger points and the local variable slot may be reused to store an object of a different type. This can cause bizarre errors to manifest when the local variable reference is evaluated in the rule.

            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: