java/8447: java/lang/Thread.java:0: Internal error: Segmentation fault
vruiz@ual.es
vruiz@ual.es
Mon Nov 4 04:06:00 GMT 2002
>Number: 8447
>Category: java
>Synopsis: java/lang/Thread.java:0: Internal error: Segmentation fault
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 04 04:06:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: vruiz@ual.es
>Release: gcc version 2.95.4 20011002 (Debian prerelease)
>Organization:
>Environment:
Linux version 2.2.20 (herbert@gondolin) (gcc version 2.7.2.3) #1 Sun Nov 4 15:44:23 EST 2001
Debian GNU/Linux testing/unstable gogh.ace.ual.es
>Description:
I found these error compiling the file:
import java.io.InputStream;
import java.io.OutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
public class ShortToFloat extends GenericProducerAndConsumer {
ShortToFloat(InputStream input, OutputStream output) {
super(input,output);
}
protected void ProduceAndConsume() {
int verbosity = 2;
DataInputStream dataInput = new DataInputStream(input);
DataOutputStream dataOutput = new DataOutputStream(output);
try {
for(;;) {
int x = dataInput.readShort();
float y = x;
dataOutput.writeFloat(y);
}
} catch (IOException e) {
if(verbosity > 0) {
System.err.println("ShortToFloat: EOF reached");
if(verbosity > 1) {
e.printStackTrace();
}
}
try {
dataOutput.flush();
} catch (IOException ee) {}
}
}
public static void main(String[] args) {
if(args.length > 0) {
System.err.println("ShortToFloat < ShortFile > FloatFile");
} else {
DataInputStream input = new DataInputStream(System.in);
DataOutputStream output = new DataOutputStream(System.out);
ShortToFloat converter = new ShortToFloat(input,output);
converter.start();
}
}
}
The father file GenericProducerAndConsumer.java is:
import java.io.InputStream;
import java.io.OutputStream;
public abstract class GenericProducerAndConsumer implements Runnable {
InputStream input;
OutputStream output;
Thread theThread;
/* El constructor lanza el thread */
public GenericProducerAndConsumer(InputStream input, OutputStream output) {
this.input = input;
this.output = output;
theThread = new Thread(this);
}
/* Lanza el hilo productor/consumidor */
public void start() {
theThread.start();
}
/* Funci'on espec'ifica de producci'on de datos */
protected abstract void ProduceAndConsume();
/* Lanza la producci'on de datos */
public void run() {
ProduceAndConsume();
}
}
The compiling line is:
gcj -c ShortToFloat.java
And the output is:
ShortToFloat.java:0: warning: Source file for class `GenericProducerAndConsumer' is newer than its matching class file. Source file used instead
java/lang/Thread.java:0: Internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
I hope this help.
Vicente.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Java-prs
mailing list