solanum-vs-hackint-and-char.../librb/src
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.c Add semicolon to fix a compile error in librb/src/arc4random.c 2022-09-30 18:27:26 +01:00
balloc.c The rb_heap_block struct doesn't appear to be used anywhere 2021-07-31 00:09:08 -04:00
commio.c Delay rehashing until we're not processing events 2023-11-06 14:22:55 +00:00
crypt.c
devpoll.c
dictionary.c
epoll.c
event.c
export-syms.txt Delay rehashing until we're not processing events 2023-11-06 14:22:55 +00:00
gnutls.c
gnutls_ratbox.h
helper.c
kqueue.c
linebuf.c
Makefile.am
mbedtls.c
mbedtls_ratbox.h
nossl.c
openssl.c
openssl_ratbox.h
patricia.c
poll.c Remove ancient portability code (#361) 2022-08-24 20:53:52 -04:00
ports.c
radixtree.c Mailmap and copyright update for Ariadne 2021-06-01 12:40:02 -04:00
rawbuf.c
rb_lib.c
rb_memory.c
sigio.c Remove ancient portability code (#361) 2022-08-24 20:53:52 -04:00
tools.c
unix.c
version.c.SH