solanum-vs-hackint-and-char.../librb/include
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
..
arc4random.h rename libratbox to librb, since its pretty modified anyway 2016-03-06 02:30:20 -06:00
commio-int.h Remove ancient portability code (#361) 2022-08-24 20:53:52 -04:00
commio-ssl.h librb: remove socklen parameter from rb_connect_tcp 2016-04-24 17:11:20 +01:00
event-int.h librb/event: delete indirectly via a dead flag 2019-09-07 14:50:42 +01:00
rb_balloc.h Remove the rest of the SVN id tags 2016-03-23 20:13:12 -04:00
rb_commio.h Delay rehashing until we're not processing events 2023-11-06 14:22:55 +00:00
rb_dictionary.h Remove Windows support 2021-07-30 14:17:47 -04:00
rb_event.h librb: rb_run_event -> rb_run_one_event 2016-04-02 23:38:28 -05:00
rb_helper.h librb: silence some fairly harmless compiler warnings 2016-06-01 20:54:11 +00:00
rb_lib.h Remove Windows support 2021-07-30 14:17:47 -04:00
rb_linebuf.h ircd: send tags on every message 2017-08-06 16:21:29 +01:00
rb_memory.h librb: silence some fairly harmless compiler warnings 2016-06-01 20:54:11 +00:00
rb_patricia.h remove RB_IPV6 2017-08-20 12:54:46 +01:00
rb_radixtree.h Mailmap and copyright update for Ariadne 2021-06-01 12:40:02 -04:00
rb_rawbuf.h Remove the rest of the SVN id tags 2016-03-23 20:13:12 -04:00
rb_tools.h librb: remove zstring 2017-08-06 18:40:24 +01:00