public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libgcj/1377: Multidimensional array creation fails at runtime
@ 2000-12-20 12:25 bryce
  0 siblings, 0 replies; only message in thread
From: bryce @ 2000-12-20 12:25 UTC (permalink / raw)
  To: java-gnats

>Number:         1377
>Category:       libgcj
>Synopsis:       Multidimensional array creation fails at runtime
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    tromey
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:19:26 PST 2000
>Closed-Date:    Wed Aug 18 20:26:11 PDT 1999
>Last-Modified:  Wed Aug 18 20:26:11 PDT 1999
>Originator:     Bryce McKinlay
>Release:        current cvs libjava, any gcj version
>Organization:
>Environment:
Linux reason 2.2.5 #10 Mon May 10 13:52:11 NZST 1999 i686 unknown
>Description:
A recent change to libgcj seems to have resulted in the
instantiation of multi-dimensional arrays to produce a 
NullPointerException. I don't think this is a compiler 
problem since going back to older compilers doesn't fix it 
but going back to an older libgcj does.

>How-To-Repeat:
public class Array_2
{
  static final int a = 10, b = 15;
  
  public static void main(String args[])
  {
    int[][] foo = new int [a][b];
    System.out.println(foo.length);
    System.out.println(foo[a-1].length);
  }
}

./Array_2

uncaught exception at top level
java.lang.NullPointerException

(gdb) r
Starting program: /home/bryce/projects/libgcj/libjava/testsuite/libjava.lang/./Array_2 
[New Thread 3820]
[New Thread 3819]
[New Thread 3821]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 3821]

Program received signal SIGSEGV, Segmentation fault.
0x40108645 in java::lang::Class::isArray (this=0x804dc6e)
    at ../../../libjava/java/lang/Class.h:121
121           return name->data[0] == '[';
Current language:  auto; currently c++
(gdb) bt
#0  0x40108645 in java::lang::Class::isArray (this=0x804dc6e)
    at ../../../libjava/java/lang/Class.h:121
#1  0x40093d30 in _Jv_NewMultiArray (array_type=0x804dc6e, dimensions=2)
    at ../../../libjava/java/lang/Class.h:78
#2  0x40093e2c in _Jv_NewMultiArray () at ../../../libjava/prims.cc:457
#3  0x804ad27 in Array_2::main (args=0x806fff0) at Array_2.java:7
#4  0x40109e0a in java::lang::FirstThread::run0 (this=0x8067f90)
    at ../../../libjava/java/lang/natFirstThread.cc:66
#5  0x400c35f4 in java::lang::FirstThread::run (this=0x8067f90)
    at ../../../libjava/java/lang/FirstThread.java:26
#6  0x400cd5d6 in java::lang::Thread::run_ (this=0x8067f90)
    at ../../../libjava/java/lang/Thread.java:119
#7  0x4010e4d6 in java::lang::Thread::run__ (obj=0x8067f90)
    at ../../../libjava/java/lang/natThread.cc:257
#8  0x4011e471 in really_start (x=0x8062ef0)
    at ../../../libjava/posix-threads.cc:289
#9  0x401c5846 in GC_start_routine (arg=0x8085fe0)
    at ../../../boehm-gc/linux_threads.c:539
#10 0x401dcce9 in pthread_start_thread (arg=0xbf7ffe7c) at manager.c:204
>Fix:

>Release-Note:

>Audit-Trail:

Formerly PR libgcj/35


From: Tom Tromey <tromey@cygnus.com>
To: bryce@albatross.co.nz
Cc: java-gnats@sourceware.cygnus.com
Subject: Re: libgcj/35: Multidimensional array creation fails at runtime
Date: Tue, 17 Aug 1999 15:06:46 -0700

 Thanks for the report.
 I added your test case to the repository.
 I don't know when I'll have a chance to look at it
 T
State-Changed-From-To: open->closed
State-Changed-By: bryce
State-Changed-When: Wed Aug 18 20:26:11 1999
State-Changed-Why:
    Kresten's latest cvs changes have fixed this.
>Unformatted:



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-12-20 12:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-20 12:25 libgcj/1377: Multidimensional array creation fails at runtime bryce

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).