Bug 18482 - JustIce Pass3bVerifier Verifies Exception Handlers too often
Summary: JustIce Pass3bVerifier Verifies Exception Handlers too often
Alias: None
Product: BCEL - Now in Jira
Classification: Unclassified
Component: Main (show other bugs)
Version: unspecified
Hardware: All All
: P5 enhancement
Target Milestone: ---
Assignee: issues@commons.apache.org
URL: http://www.markcrocker.com/~mcrocker/...
Depends on:
Reported: 2003-03-28 21:47 UTC by Mark Crocker
Modified: 2006-03-24 19:37 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Mark Crocker 2003-03-28 21:47:19 UTC
While using the JustIce Verifier that is built into BCEL to investigate some
issues with the Purifier project (a pure Java preverifier.  See
http://www.markcrocker.com/~mcrocker/Computer/Purifier/), I noticed that the
internal state of JustIce occasionally disagreed with the StackMaps produced by
Sun's preverifier.

The problem seems to be that JustIce considers Exception handlers to be possible
successors for EVERY instruction in a try block that result in merge changes
when the outgoing frame is merged with the incoming frame of the first
instruction in the Exception handler.

I believe that this is an overly broad interpretation of the specification. 
Only instructions that can actually throw the type (or subtype) of Exception
that a handler is designed to catch should be considered to have possible a
successor of the handler.

An excruciatingly detailed report with source code, bytecode and Data Flow
Analysis can be found at:

The solution would be to check if an instruction can throw the type of Exception
that the handler can catch BEFORE checking to see if a merge causes a change. 
This would probably be a fairly involved task.
Comment 1 Enver Haase 2003-11-02 19:40:17 UTC
Yes, that might be a tough task that is prone to errors, and will probably
not really speed up verification. However, if you'd do the coding and submit
a patch, I'll read through it and would be very happy to add it.