This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

java/3730: byte code verifier type sensitivity bug



>Number:         3730
>Category:       java
>Synopsis:       byte code verifier type sensitivity bug
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 18 11:26:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     alk@post.com
>Release:        3.0.1 branch
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
public class WriterPreferenceReadWriteLock {
  protected long waitingReaders_ = 0;
  protected synchronized void cancelledWaitingReader() { --waitingReaders_; return; }
}

does not compile.  changing 'long' to 'int', it compiles.
The complaint is:

WriterPreferenceReadWriteLock.java: In class `WriterPreferenceReadWriteLock': 
WriterPreferenceReadWriteLock.java: In method `finit$()': 
WriterPreferenceReadWriteLock.java:2: verification error at PC=2 
WriterPreferenceReadWriteLock.java:2: expected type 'long' but stack contains 'void' 
WriterPreferenceReadWriteLock.java: In method `WriterPreferenceReadWriteLock.cancelledWaitingReader()': 
WriterPreferenceReadWriteLock.java:3: expected type 'long' but stack contains 'void' 
WriterPreferenceReadWriteLock.java:3: Invalid multi-word value on type stack 
WriterPreferenceReadWriteLock.java:3: verification error at PC=8 
WriterPreferenceReadWriteLock.java:3: expected type 'long' but stack contains 'void' 
>How-To-Repeat:
see description
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-java; name="WriterPreferenceReadWriteLock.java"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="WriterPreferenceReadWriteLock.java"

cHB1YmxpYyBjbGFzcyBXcml0ZXJQcmVmZXJlbmNlUmVhZFdyaXRlTG9jayB7CiAgcHJvdGVjdGVk
IGxvbmcgd2FpdGluZ1JlYWRlcnNfID0gMDsKICBwcm90ZWN0ZWQgc3luY2hyb25pemVkIHZvaWQg
Y2FuY2VsbGVkV2FpdGluZ1JlYWRlcigpIHsgLS13YWl0aW5nUmVhZGVyc187IHJldHVybjsgfQp9
Cgo=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]