java/9461: -fno-assume-compiled and source compilation

tromey@redhat.com tromey@redhat.com
Mon Jan 27 19:56:00 GMT 2003


>Number:         9461
>Category:       java
>Synopsis:       -fno-assume-compiled and source compilation
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 27 19:26:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Tom Tromey
>Release:        unknown-1.0
>Organization:
>Environment:

>Description:
If you compile a class with -fno-assume-compiled from
source, and it refers to non-compiled classes that were
compiled from bytecode (or vice versa), you can wind up with 
code that fails at runtime.

What happens is that the bytecode front end will see
synthetic methods like class$, which won't be seen by
the source front end.  Since with -fno-assume-compiled
method invocations are routed through the caller's method
table, the method table index can be incorrect, yielding
an incorrect call at runtime.

One fix might be to sort the method table so that all
synthetic methods appear at the end.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list