pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/50995: sigsegv in recv()
The following reply was made to PR pkg/50995; it has been noted by GNATS.
From: Patrick Welche <prlw1%cam.ac.uk@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: pkg-manager%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, pkgsrc-bugs%netbsd.org@localhost
Subject: Re: pkg/50995: sigsegv in recv()
Date: Mon, 4 Apr 2016 16:15:02 +0100
On Sun, Apr 03, 2016 at 03:25:00AM +0000, David Holland wrote:
> An out-of-range FD_SET will scribble outside of the fd_set, and since
> the one here is on the stack, whatever's next on the stack gets a
> present.
bug analyzed :-) Thanks!
> The path of least resistance is #define FD_SETSIZE 512 (before
> including anything) but rewriting to use poll is probably a better
> choice. Especially for selecting on a single fd like this.
I am testing
CONFIGURE_ARGS+= CPPFLAGS=-DFD_SETSIZE=512
I saw that solaris 7 uses 1024 by default. I think we might just have
been unlucky, as maxchildren = 250, so 512 should be enough. In the
patches I'm testing, I complain if it is not enough, so we won't get
the mysterious core dumps...
> (while changing FD_SETSIZE is a traditional interface, it's probably
> not very portable)
>
> Does the package have a viable upstream?
No, but e2guardian is looking promising. I already looked at using
kqueue instead, and saw:
https://github.com/e2guardian/e2guardian/issues/88
Home |
Main Index |
Thread Index |
Old Index