[Bug libgcj/21941] New: NPE in Socket.connect()

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Bug libgcj/21941] New: NPE in Socket.connect()

cvs-commit at gcc dot gnu.org
I get a NullPointerException in Socket.connect().
This seems to happen when the nameserver is not available.
My current test case is with gcjappletviewer; I can reproduce it
by stopping my VPN but leaving my /etc/resolv.conf untouched
(so it tries to contact a DNS server which is not available)

(I also remember seeing NPEs from PlainSocketImpl::connect,
but I can't reproduce that presently.  These occurred when
"tmp" was NULL...)

opsy. ./gcjappletviewer http://www.chessgames.com/perl/chessgame?gid=1067300
raw arguments:
 http://www.chessgames.com/perl/chessgame?gid=1067300
java.lang.NullPointerException
   at java.net.Socket.connect(java.net.SocketAddress, int)
(/home/tromey/gnu/4.0/install/lib/libgcj.so.6.0.0)
   at java.net.Socket.connect(java.net.SocketAddress)
(/home/tromey/gnu/4.0/install/lib/libgcj.so.6.0.0)
   at gnu.java.net.protocol.http.HTTPConnection.getSocket()
(/home/tromey/gnu/4.0/install/lib/libgcj.so.6.0.0)
   at gnu.java.net.protocol.http.HTTPConnection.getOutputStream()
(/home/tromey/gnu/4.0/install/lib/libgcj.so.6.0.0)
   at gnu.java.net.protocol.http.Request.dispatch()
(/home/tromey/gnu/4.0/install/lib/libgcj.so.6.0.0)
   at gnu.java.net.protocol.http.HTTPURLConnection.connect()
(/home/tromey/gnu/4.0/install/lib/libgcj.so.6.0.0)
   at gnu.java.net.protocol.http.HTTPURLConnection.getInputStream()
(/home/tromey/gnu/4.0/install/lib/libgcj.so.6.0.0)
   at java.net.URL.openStream() (/home/tromey/gnu/4.0/install/lib/libgcj.so.6.0.0)
   at gnu.gcjwebplugin.AppletTag.parseAppletTags(java.lang.String,
java.lang.String) (Unknown Source)
   at
gnu.gcjwebplugin.StandaloneAppletViewer.StandaloneAppletViewer(java.lang.String,
java.lang.String, java.lang.String, java.util.List, java.awt.Dimension, boolean,
boolean, boolean, java.lang.String[], gnu.getopt.Getopt, int, java.lang.String)
(Unknown Source)
   at gnu.gcjwebplugin.AppletViewer.main(java.lang.String[]) (Unknown Source)
   at .main (/home/tromey/gnu/mozilla/gcjwebplugin/src/gcjappletviewer.c:189)
   at .__libc_start_main (/lib/tls/libc-2.3.3.so)

--
           Summary: NPE in Socket.connect()
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tromey at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21941