Bug 71910 - Weird exception handlers ranges with any exception handlers
Summary: Weird exception handlers ranges with any exception handlers
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M2   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-12 18:02 EDT by Olivier Thomann CLA
Modified: 2004-09-23 05:38 EDT (History)
0 users

See Also:


Attachments
Source code to compile (179 bytes, text/plain)
2004-08-12 18:03 EDT, Olivier Thomann CLA
no flags Details
Apply on HEAD of jdt.core project (13.48 KB, patch)
2004-08-12 18:03 EDT, Olivier Thomann CLA
no flags Details | Diff
Apply on HEAD of jdt.core tests project (3.14 KB, patch)
2004-08-12 18:04 EDT, Olivier Thomann CLA
no flags Details | Diff
Apply on HEAD of jdt.core compiler tests project (949 bytes, patch)
2004-08-12 18:04 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2004-08-12 18:02:47 EDT
Comppile the attached A.java.

Eclipse 3.0 reports:
      Exception Table:
        [pc: 4, pc: 17] -> 17 when : any
        [pc: 0, pc: 23] -> 23 when : any
        [pc: 42, pc: 45] -> 23 when : any

HEAD reports:
      Exception Table:
        [pc: 4, pc: 14] -> 17 when : any
        [pc: 17, pc: 19] -> 17 when : any
        [pc: 0, pc: 28] -> 23 when : any
        [pc: 42, pc: 45] -> 23 when : any

I would say that this is suspicious. I don't understand why the exception
handler would go backwards (0-28 -> 23).

I will attach proposed patches.
Comment 1 Olivier Thomann CLA 2004-08-12 18:03:26 EDT
Created attachment 13931 [details]
Source code to compile
Comment 2 Olivier Thomann CLA 2004-08-12 18:03:54 EDT
Created attachment 13932 [details]
Apply on HEAD of jdt.core project
Comment 3 Olivier Thomann CLA 2004-08-12 18:04:18 EDT
Created attachment 13933 [details]
Apply on HEAD of jdt.core tests project
Comment 4 Olivier Thomann CLA 2004-08-12 18:04:37 EDT
Created attachment 13934 [details]
Apply on HEAD of jdt.core compiler tests project
Comment 5 Olivier Thomann CLA 2004-08-23 15:51:44 EDT
With the patch we would have:
        [pc: 4, pc: 17] -> 17 when : any
        [pc: 0, pc: 23] -> 23 when : any
        [pc: 42, pc: 45] -> 23 when : any

This looks much better. I will release the changes to fix this. I need these
changes to updates the tests for bug 70997.
Philippe, please review the changes.
Comment 6 Olivier Thomann CLA 2004-08-23 15:52:18 EDT
Fixed and released in HEAD.
Regression tests added.
Comment 7 Olivier Thomann CLA 2004-09-22 11:47:13 EDT
Reverted the changes for the synchronized statement.
Comment 8 Olivier Thomann CLA 2004-09-22 11:47:48 EDT
jck tests were affected by this change.
Comment 9 Olivier Thomann CLA 2004-09-22 11:48:54 EDT
Reopen to close as invalid since the synchronized statement needs to be untouched.
Comment 10 Olivier Thomann CLA 2004-09-22 11:49:42 EDT
The changes remain valid for the try/finally.
Comment 11 Olivier Thomann CLA 2004-09-22 11:51:31 EDT
The test case is invalid since it contains a synchronized statement.
Comment 12 David Audel CLA 2004-09-23 05:38:33 EDT
Verified in I200409212000.