Subject: Re: JDK status (was: Re: Netscape on macppc: it works!)
To: Todd Vierling <tv@wasabisystems.com>
From: Emmanuel Dreyfus <p99dreyf@criens.u-psud.fr>
List: port-macppc
Date: 03/03/2001 16:16:48
> : manu@trotsky</usr/local/jdk13/bin>./java -green -version
> : java: ../../../../../src/solaris/hpi/green_threads/src/dl-malloc.c:1636:
> : malloc_extend_top: Assertion `((size_t)((char*)(((mbinptr)(&(av_[2 *
> : (0)])))->fd) + top_size) & (pagesz - 1)) == 0' failed.
> : Abort (core dumped)
>
> Then something is borking internal structures of the JVM; possibly, we don't
> emulate what's needed to do Linux longjmp()/siglongjmp() properly.
I tried this test program:
#include <setjmp.h>
#include <stdio.h>
void g(void);
jmp_buf env;
int i = 0;
int main (int argc, char* argv) {
if (setjmp(env) != 0) {
(void) printf("2nd return from setjmp: i = %d\n", i);
exit(0);
}
(void) printf("1st return from setjmp: i = %d\n", i);
i = 1;
g();
/*NOTREACHED*/
}
void g(void) {
longjmp(env, 1);
/*NOTREACHED*/
}
It works as expected in emulation:
1st return from setjmp: i = 0
2nd return from setjmp: i = 1
But I don't understand what support should be necessary here? Aren't
setjmp/longjmp library only calls (I mean they do not cause system
call)?
--
Emmanuel Dreyfus.
p99dreyf@criens.u-psud.fr