This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
stack overflows by java.lang.reflect.Array.newInstance(Class,int)
- From: Andrew Haley <aph at redhat dot com>
- To: Bojan Antonovic <bojan at antonovic dot com>
- Cc: java at gcc dot gnu dot org
- Date: Thu, 28 Oct 2004 17:35:25 +0100
- Subject: stack overflows by java.lang.reflect.Array.newInstance(Class,int)
- References: <418112E3.3030003@antonovic.com>
Bojan Antonovic writes:
> I have a problem with Sun's/Apple's java AND gij. In my code I'm using
> java.lang.reflect.Array.newInstance(Class,int). But from a point on, I
> can't continue because Array.newInstance and
>
> Bla[] x=new Bla[size];
>
> are producing a StackOverflowError on java and a bus error with gij. The
> point is that I'm NOT in a recursion, because I can see the output on
> the console. gdb shows for gij:
>
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> 0x02c243cc in _Jv_InterpMethod::run(void*, ffi_raw*) (this=0x60640,
> retp=0x0, args=0xbf800140) at ../../../gcc-3.4.2/libjava/interpret.cc:786
> 786 {
That probably is a stack overflow.
> Does somebody know how the stack size can be increased, or if this is a
> bug? Array.newInstance is a native method. Giving more memory by -Xmx
> and -Xss doesn't help.
Show us your code ...
Andrew.