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

CFG open monitor propagation algorithm cannot detect shadow try catch regions fo super types

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None
    • None

      The CFG open monitor propagation algorithm attempts to propagate information about outstanding monitorenter instructions through the control flow graph along normal and exceptional control flow paths. This includes a stage where it propagates them from blocks which lie in try catch regions to the corresponding handler blocks. This algorithm has to take account of shadowing. If two try catch regions a and b are nested with b inside a and if they catch exceptions of type A and B where null <= B <= A i.e. B is a supertype of A, equal to A or null (a catch all block which catches any exception) then any exception of type B thrown in region b will not reach the handler for region a.

      If A and B are named types then the current algorithm cannot simply identify the case where null < B < A by checking the relevant classes since this may require loading of code. This is not permissible during transformation.

      n.b. this problem may potentially be avoided by recursively loading the class file containing the bytecode of A and its supers as a resource, checking the bytecode at each load to locate the next super. of course, this will not necessarily work with all class loaders nor will it work if other transformers are present which change the class hierarchy.

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

                Created:
                Updated: