jc1 segfaults, please help

Bryce McKinlay bryce@waitaki.otago.ac.nz
Wed Feb 13 02:38:00 GMT 2002

Adam Megacz wrote:

>Hey, is anybody here interested in figuring this out? I know squat
>about the java frontend, so somebody more familiar with it can
>probably figure out in a few minutes what would take me a few weeks.

The problem is caused by java/builtins.c (which was recently added). It 
sets up a builtin_types array but does not initialize them (see 
define_builtin_type). define_builtin gets called with a NULL_TREE type 
parameter, and that passes the NULL_TREE to build_decl, which is wrong. 
I guess it is just chance that it doesn't crash on other platforms.

The solution would be to do something closer to what 
c-common.c:c_common_nodes_and_builtins() does instead, though it seems a 
bit crap to duplicate so much code. It would be nice to be able to share 
them somehow, but I guess the problem with doing this is the 
conflicts/mismatches between Java and C primitive types?



More information about the Java mailing list