Bug 21517 - Bytecode -> native code mis-compilation
Summary: Bytecode -> native code mis-compilation
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.3
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-code
Depends on: 23182
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-11 18:42 UTC by Andrew Overholt
Modified: 2005-11-08 20:07 UTC (History)
7 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-09-30 15:38:02


Attachments
EditorActionBars bytecode (1 of 3) (3.52 KB, application/octet-stream)
2005-05-11 18:43 UTC, Andrew Overholt
Details
EditorActionBars bytecode (2 of 3) (171 bytes, application/octet-stream)
2005-05-11 18:44 UTC, Andrew Overholt
Details
EditorActionBars bytecode (3 of 3) (719 bytes, application/octet-stream)
2005-05-11 18:44 UTC, Andrew Overholt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Overholt 2005-05-11 18:42:55 UTC
I don't have a small test case for this, but we've narrowed
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=151919 down to be a gcj
mis-compilation.  The jar that is being mis-compiled is
org.eclipse.ui.workbench.  The symptom is that files can't be opened in Eclipse.
 Removing the .jar.so makes the erroneous behaviour disappear.

The top of the stack trace (this appears in the Eclipse editor window where the
file contents should be) looks like this:

java.lang.ClassCastException:
org.eclipse.ui.internal.PlaceholderContributionItem cannot be cast to
org.eclipse.jface.action.ToolBarContributionItem
   at org.eclipse.ui.internal.EditorActionBars.getToolBarManager()
(/usr/lib/eclipse/plugins/org.eclipse.ui.workbench_3.1.0.jar.so)
   at
org.eclipse.ui.part.EditorActionBarContributor.init(org.eclipse.ui.IActionBars)
(/usr/lib/eclipse/plugins/org.eclipse.ui.workbench_3.1.0.jar.so)

I'll attach the bytecode of EditorActionBars but the entire jar is 2.4 MB so
it's probably stupid to attach the entire thing to this bug report.  I've put it
here instead:

http://people.redhat.com/overholt/org.eclipse.ui.workbench_3.1.0.jar

The source for this plugin is available here:

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ui.workbench/?only_with_tag=v20050331-2000

I'm sorry I can't be more specific.  I wanted to get this here while the
knowledge was fresh.
Comment 1 Andrew Overholt 2005-05-11 18:43:38 UTC
Created attachment 8864 [details]
EditorActionBars bytecode (1 of 3)
Comment 2 Andrew Overholt 2005-05-11 18:44:01 UTC
Created attachment 8865 [details]
EditorActionBars bytecode (2 of 3)
Comment 3 Andrew Overholt 2005-05-11 18:44:32 UTC
Created attachment 8866 [details]
EditorActionBars bytecode (3 of 3)
Comment 4 Andrew Overholt 2005-05-11 18:45:39 UTC
I tried compiling the bytecode with Sun's javac (as opposed to ecj) and the
results are the same.
Comment 5 Andrew Pinski 2005-08-27 22:25:35 UTC
Hmm, is this with -findirect-dispatch?

if that is true, I think this is related to PR 23182.
Comment 6 Tom Tromey 2005-11-08 19:23:42 UTC
I agree, this looks like PR 23182.
Andrew (Overholt) -- does this bug still occur for you?
Comment 7 Andrew Overholt 2005-11-08 19:31:16 UTC
(In reply to comment #6)
> I agree, this looks like PR 23182.
> Andrew (Overholt) -- does this bug still occur for you?

No.  Sorry, I should have closed this when I first realized that it was no longer occurring.  Shall I close?
Comment 8 Tom Tromey 2005-11-08 20:07:31 UTC
Fixed.