Java bootstrap failure for libjava/java/io/FilePermission.java

Graham Stott grahams@redhat.com
Mon Jan 29 14:11:00 GMT 2001


Bryce McKinlay wrote:
>> Gerald Pfeifer wrote:
>> > /cvs/gcc/libjava/java/io/FilePermission.java: In method
> > `java.io.FilePermission.implies(java.security.Permission)':
> > /cvs/gcc/libjava/java/io/FilePermission.java:171: Internal error:
> > Segmentation fault.
>> Yes, I got this too. It appears to be related to:
>> 2001年01月28日 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
>> * stmt.c (estimate_case_costs): Use integer_minus_one_node.
>> * tree.c (build_common_tree_nodes_2): Set integer_minus_one_node.
>> * tree.h (tree_index): Add new element TI_INTEGER_MINUS_ONE.
> (integer_minus_one_node): Define.
>> regards
>> [ bryce ]

At a guess could we now have exceed 256 different tree nodes?
If we have then this bit of code from java/lang.c is now
broken because we will trample past the end of the arrays. 
 /* Append to Gcc tree node definition arrays */
 memcpy (tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE,
 java_tree_code_type,
 (int)LAST_JAVA_TREE_CODE - (int)LAST_AND_UNUSED_TREE_CODE);
 memcpy (tree_code_length + (int) LAST_AND_UNUSED_TREE_CODE,
 java_tree_code_length,
 (LAST_JAVA_TREE_CODE -
 (int)LAST_AND_UNUSED_TREE_CODE) * sizeof (int));
 memcpy (tree_code_name + (int) LAST_AND_UNUSED_TREE_CODE,
 java_tree_code_name,
 (LAST_JAVA_TREE_CODE -
 (int)LAST_AND_UNUSED_TREE_CODE) * sizeof (char *));
Note tree_code_type is declared as tree_code_type[MAX_TREE_CODES] in
gcc/tree.c and MAX_TREE_CODES is 256.
We probably need a sanity check that LAST_JAVA_TREE_CODE < MAX_TREE_CODE
here and similar sanity checks in the other front ends.
Graham


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /