User account creation filtered due to spam.

Bug 33789 - gij crashes when sending serialized objects through a pipe
Summary: gij crashes when sending serialized objects through a pipe
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2007-10-16 01:17 UTC by Robert Schiele
Modified: 2016-09-30 22:50 UTC (History)
2 users (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
Build: x86_64-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Robert Schiele 2007-10-16 01:17:51 UTC
I can crash gij when I read multiple serialized objects (type does not matter) from a PipedInputStream.  You can reproduce the bug with the following small example:

public class Test {
    public static void main(String[] args) throws Throwable { mout = new;
        new Reader(new; os = new;
        for (int i = 0; i < 1000; ++i)
            os.writeObject(new Integer(1));

    static class Reader extends Thread { pin;
        Reader( in) {
            pin = in;
        public void run() {
            try {
        is =
                for (int i = 0; i < 1000; ++i)
            } catch (Exception t) {
                System.err.println("Exception: " + t);

It does not matter whether you compile this with gcj or the Sun Java compiler thus the compiler is obviously not the problem.

Running this in gij with

gij Test

leads to a random exception.  Running the same code in the Sun JVM does not cause any problems.

This is tested with the current SVN tree (trunk revision 129368) and with several released versions as shipped with various Linux distributions (tested on Redhat/Fedora and SUSE).
Comment 1 Andrew Pinski 2016-09-30 22:50:42 UTC
Closing as won't fix as the Java front-end has been removed from the trunk.