public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libgcj/10868: java.net.ServerSocket's constructors create and leak extra sockets
@ 2003-05-19 16:46 gbenson
  0 siblings, 0 replies; only message in thread
From: gbenson @ 2003-05-19 16:46 UTC (permalink / raw)
  To: gcc-gnats


>Number:         10868
>Category:       libgcj
>Synopsis:       java.net.ServerSocket's constructors create and leak extra sockets
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 19 16:46:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     gbenson@redhat.com
>Release:        HEAD
>Organization:
>Environment:
Red Hat Linux 9
>Description:
The control flow of ServerSocket(int port, int backlog, InetAddress bindAddr) is as follows:

 this();
 impl.create(true);
 impl.bind(bindAddr, port);
 impl.listen(backlog);

The call to this() also calls impl.create(true), meaning that a second socket is created and the original socket is leaked. ServerSocket(int port) and ServerSocket(int port, int backlog) both call ServerSocket(int port, int backlog, InetAddress bindAddr) so they also leak a socket per call.
>How-To-Repeat:

>Fix:
Remove the call to impl.create() from ServerSocket(int port, int backlog, InetAddress bindAddr).
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-19 16:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-19 16:46 libgcj/10868: java.net.ServerSocket's constructors create and leak extra sockets gbenson

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).