public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: vruiz@ual.es To: gcc-gnats@gcc.gnu.org Subject: java/8447: java/lang/Thread.java:0: Internal error: Segmentation fault Date: Mon, 04 Nov 2002 04:06:00 -0000 [thread overview] Message-ID: <20021104115644.22032.qmail@sources.redhat.com> (raw) >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:
reply other threads:[~2002-11-04 12:06 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20021104115644.22032.qmail@sources.redhat.com \ --to=vruiz@ual.es \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).