diff options
| author | bptato <nincsnevem662@gmail.com> | 2024-12-05 21:06:59 +0100 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2024-12-05 21:07:18 +0100 |
| commit | b92f653d6f4f9b3b862777e5c150c035f14cbd30 (patch) | |
| tree | e3d1a8c5509a690c1b257cddd4734eedd7ceedea /test | |
| parent | c056cbfb5e4708d605e4f9547412fdb049258d4a (diff) | |
| download | chawan-b92f653d6f4f9b3b862777e5c150c035f14cbd30.tar.gz | |
loader: fix heisenbug
Unconditionally registering output handles on resume could result in a
failed assertion on double-register.
The bug would appear like:
resume (register) -> handleRead -> pushBuffer -> currentBuffer is nil ->
register again
handleWrite had a very high likelihood of occurring between resume and
handleRead, and that hid the bug by immediately unregistering the handle
after resume. In fact, I haven't been able to reproduce the bug at all
today, and only found it after poring over the source...
Fix this by not registering output handles that are empty (except
if the istream is already finished, in which case it will just be
unregistered).
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions