Bug#165635: gcj-3.0 : segmentation fault on compiling bad program
Package: gcj-3.0
Version: 1:3.0.4-7
Severity: important
When compiling the file :
---------begin-of-essai_bug.java--------------
class essai_bug {
public static void main (String[] argLigneDeCommande) {
int i=0;
int a;
int b=1;
for (i=a; i<=b; i++){
System.out.println("i = "+i);
}
}
}
---------end-of-fichier-essai_bug.java-----
which is a bad java file because 'a' has no value.
the compiler "gcj -C essai_bug.java" has a segmentation fault with the error message :
-----begin of error message------------------------
essai_bug.java: In class `essai_bug':
essai_bug.java: In method `essai_bug.main(java.lang.String[])':
essai_bug.java:2: Internal error: Erreur de segmentation
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
------end of error message-------------------------
instead of a warning about the initialisation of the 'a' variable
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~La ligne de commande : "gcj -C essai_bug.java" rend :
~
~-----début-de-sortie-erreur------------------------
~essai_bug.java: In class `essai_bug':
~essai_bug.java: In method `essai_bug.main(java.lang.String[])':
~essai_bug.java:2: Internal error: Erreur de segmentation
~Please submit a full bug report,
~with preprocessed source if appropriate.
~See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
~------fin-de-sortie-erreur-------------------------
~
~en compilant (en bytecode) le fichier suivant :
~---------debut-de-essai_bug.java--------------
~class essai_bug {
~ public static void main (String[] argLigneDeCommande) {
~ int i=0;
~ int a;
~ int b=1;
~ for (i=a; i<=b; i++){
~ System.out.println("i = "+i);
~ }
~ }
~}
~---------fin-de-fichier-essai_bug.java-----
~
~alors qu'on devrait avoir juste un message indiquant que a n'est pas initialisé.
~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
System Information
Debian Release: 3.0
Kernel Version: Linux frjperso 2.4.16-k7 #1 Wed Nov 28 11:06:52 EST 2001 i686 unknown
Versions of the packages gcj-3.0 depends on:
ii gcc-3.0 3.0.4-7 The GNU C compiler.
ii gcc-3.0-base 3.0.4-7 The GNU Compiler Collection (base package).
ii java-common 0.14 Base of all Java packages
ii libc6 2.2.5-6 GNU C Library: Shared libraries and Timezone
ii libgcc1 3.0.4-7 GCC support library.
ii libgcj2 3.0.4-7 Java runtime library for use with gcj
ii libgcj2-dev 3.0.4-7 Java development headers and static library
ii zlib1g 1.1.4-1 compression library - runtime
Reply to: