SourceForge has been redesigned. Learn more.
Close

#3 Shrike crash with added exception

closed-fixed
Core (15)
7
2007-02-09
2007-02-09
No

Shrike crashes when an InstructionExceptionHandler is added showing an IndexOutOfBoundsException in MethodEditor. We found in that code that an ExceptionHandler is added to a HashSet and subsequently a field is changed that gets used to compute hashCode and equals. Swapping those two statements works and gives the desired instrumentation.

Here's the patch:

Index: src/com/ibm/wala/shrikeBT/MethodEditor.java

--- src/com/ibm/wala/shrikeBT/MethodEditor.java (revision 649)
+++ src/com/ibm/wala/shrikeBT/MethodEditor.java (working copy)
@@ -614,8 +614,8 @@
for (int j = 0; j < hs.length; j++) {
ExceptionHandler h = hs[j];
if (!adjustedHandlers.contains(h)) {
+ h.handler = labelDefs[h.handler];
adjustedHandlers.add(h);
- h.handler = labelDefs[h.handler];
}
}
}

Discussion

  • Stephen Fink

    Stephen Fink - 2007-02-09
    • labels: --> Core
    • priority: 5 --> 7
    • assigned_to: nobody --> sjfink
    • status: open --> closed-fixed
     
  • Stephen Fink

    Stephen Fink - 2007-02-09

    Logged In: YES
    user_id=221724
    Originator: NO

    applied and checked in. thx.