solanum-vs-hackint-and-char.../librb
Ed Kellett 59ea3c6753 Delay rehashing until we're not processing events
Fixes crash introduced by 0ab6dbbc65. It's
probably a regression since it defeats a system designed to stop this
from happening, but I didn't dig through the history.

rehash() closes listeners. If we happen to get a single epoll() result
that wants to first rehash and then accept a connection, the epoll info
will point to a freed rb_fde_t. Other selectors should have similar
problems, but we didn't investigate that.

rb_fde_ts are normally batched up and freed outside the event
processing, but as of the above commit close_listeners() screws that up
by closing pending FDs immediately in order to create new listeners.

I think it might be a bit better to revert this behaviour and simply not
close listeners if we are going to open new ones over them, but have
opted for the smallest reasonable change I can think of.

Helped-by: Eric Mertens <emertens@gmail.com>
2023-11-06 14:22:55 +00:00
..
include Delay rehashing until we're not processing events 2023-11-06 14:22:55 +00:00
src Delay rehashing until we're not processing events 2023-11-06 14:22:55 +00:00
acinclude.m4 Remove ancient portability code (#361) 2022-08-24 20:53:52 -04:00
autogen.sh *sigh* comment these out until travis is fixed. 2016-04-10 17:12:42 -05:00
configure.ac Remove missed Winsock2 check 2022-08-26 18:58:49 -04:00
COPYING rename libratbox to librb, since its pretty modified anyway 2016-03-06 02:30:20 -06:00
CREDITS Innovation by sed 2020-10-15 15:52:41 +01:00
install-sh Add these for now until travis actually gets their shit together. 2016-04-10 17:07:33 -05:00
librb.pc.in Innovation by sed 2020-10-15 15:52:41 +01:00
Makefile.am Properly clean up build artifacts. 2016-04-09 04:55:57 -05:00
README.md update librb README to explain the namechange 2016-03-06 02:33:48 -06:00
TODO rename libratbox to librb, since its pretty modified anyway 2016-03-06 02:30:20 -06:00

librb

This is based on libratbox, the common runtime support code in ircd-ratbox. It has significant modifications and is no longer compatible with libratbox itself (nor can be used as a dropin replacement), so we renamed it.

original libratbox notes

  1. Most of this code isn't anywhere near threadsafe at this point. Don't hold your breath on this either.
  2. The linebuf code is designed to deal with pretty much 512 bytes per line and that is it. Anything beyond that length unless in raw mode, gets discard. For some non-irc purposes, this can be a problem, but for ircd stuff its fine.
  3. The helper code when transmitting data between helpers, the same 512 byte limit applies there as we recycle the linebuf code for this.