public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: java/5361: gcj bug
@ 2002-01-11 10:26 Alexandre Petit-Bianco
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Petit-Bianco @ 2002-01-11 10:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR java/5361; it has been noted by GNATS.

From: Alexandre Petit-Bianco <apbianco@cygnus.com>
To: Andreas Lenz <andreas.lenz@handy-games.com>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: java/5361: gcj bug 
Date: Fri, 11 Jan 2002 10:22:09 -0800 (PST)

 Andreas Lenz writes:
 
 > 	changing (2) to ++dst_byte;dst[dst_byte] != (tmp & 0xff); works !
 
 Most likely a compiler bug. Are you compiling natively or to bytecode
 only?
 
 ./A


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: java/5361: gcj bug
@ 2002-01-11 10:56 Tom Tromey
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2002-01-11 10:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR java/5361; it has been noted by GNATS.

From: Tom Tromey <tromey@redhat.com>
To: Andreas Lenz <andreas.lenz@handy-games.com>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: java/5361: gcj bug
Date: 11 Jan 2002 12:05:15 -0700

 >>>>> "Andreas" == Andreas Lenz <andreas.lenz@handy-games.com> writes:
 
 >> Release:        3.0.3
 
 I believe this is already fixed on the cvs trunk.  I think the fix is
 this patch:
 
     2001-11-18  Tom Tromey  <tromey@redhat.com>
 
 	    Fix for PR java/1401:
 	    * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
 	    arg0 is null.
 	    (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
 	    correctly.
 
 Andreas> 	java code:
 Andreas> 	public void function(byte[] dst,...)
 Andreas> 	{
 Andreas> [ ... ]
 
 Could you send a small but working sample program that shows the bug?
 That would let me verify that it is indeed fixed.
 
 Tom


^ permalink raw reply	[flat|nested] 3+ messages in thread

* java/5361: gcj bug
@ 2002-01-11 10:16 Andreas Lenz
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Lenz @ 2002-01-11 10:16 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5361
>Category:       java
>Synopsis:       ArrayIndexOutOfBounds where it should not be
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 11 10:16:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        3.0.3
>Organization:
>Environment:
System: Linux Twisty 2.4.0 #5 Mit Mai 30 16:05:26 CEST 2001 i686 unknown
Architecture: i686

host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure 
>Description:

	java code:
	public void function(byte[] dst,...)
	{
		int tmp;
		byte dst_byte;
		
		...
		copmuting tmp,
		tmp is in range 0x0000 to 0xffff
		...
		
		// here is
		// dst.length = 2
		// dst_byte = 0
		
		dst[dst_byte] |= (tmp>>8);       << (1) works
		dst[++dst_byte] |= (tmp & 0xff); << (2) dst_byte is now 2 !!
	}

	compiled with kaffe javac fails !
	compiled with sun javac works !
	changing (2) to ++dst_byte;dst[dst_byte] != (tmp & 0xff); works !

	dst_byte changes from 0 to 2
	this also happens, if the array has more elements,
	the last access fails, if dst.length == 5
	dst_byte switches from 4 to 6 !!

	The code is executed in a modified, commercial java2 MicroEdition
	I'm not sure, if the gcj is correct and the bug is in the VM,
	as the bug also occurs with the kaffe compiler

	Well, I think the bug is most likely in the VM,
	but strange nevertheless...

	Best Regards
	  Andi
	
>How-To-Repeat:
	repeats every time
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-01-11 18:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-11 10:26 java/5361: gcj bug Alexandre Petit-Bianco
  -- strict thread matches above, loose matches on Subject: below --
2002-01-11 10:56 Tom Tromey
2002-01-11 10:16 Andreas Lenz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).