public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* java/8447: java/lang/Thread.java:0: Internal error: Segmentation fault
@ 2002-11-04 4:06 vruiz
0 siblings, 0 replies; only message in thread
From: vruiz @ 2002-11-04 4:06 UTC (permalink / raw)
To: gcc-gnats
>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:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-11-04 12:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-04 4:06 java/8447: java/lang/Thread.java:0: Internal error: Segmentation fault vruiz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).