diff options
author | Andy Clement <aclement@pivotal.io> | 2016-01-07 12:56:05 -0800 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2016-01-07 12:56:05 -0800 |
commit | fd87bd57bd3c0b1533cc2803f06e7569b2f363b6 (patch) | |
tree | d56ab065b595b8082629fc1f951105e7150b5b8a | |
parent | 482995299ca0078f67c6a6038d3ce7e3745663e9 (diff) | |
download | aspectj-fd87bd57bd3c0b1533cc2803f06e7569b2f363b6.tar.gz aspectj-fd87bd57bd3c0b1533cc2803f06e7569b2f363b6.zip |
Fix 470658: Corrupted Local Variable TableV1_8_8
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java index 97e73832b..869ed5819 100644 --- a/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java +++ b/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java @@ -1324,6 +1324,16 @@ public final class LazyMethodGen implements Traceable { } } } + if (!this.enclosingClass.getWorld().generateNewLvts) { + // Here the generateNewLvts option is used to control "Do not damage unusually positioned local + // variables that represent method parameters". Strictly speaking local variables that represent + // method parameters effectively have a bytecode range from 0..end_of_method - however some + // tools generate bytecode that specifies a compressed range. The code below would normally + // extend the parameter local variables to cover the full method but by setting paramSlots to -1 + // here we cause the code below to avoid modifying any local vars that represent method + // parameters. + paramSlots = -1; + } Map<InstructionHandle, Set<Integer>> duplicatedLocalMap = new HashMap<InstructionHandle, Set<Integer>>(); for (LocalVariableTag tag : localVariables.keySet()) { |