diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-08-23 16:12:57 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-23 08:04:48 -0700 |
commit | 85da2a2ab62e24a8b9ff183fe3a451b445632487 (patch) | |
tree | 5c0f0af60471344da322772bb1c1af06082325e8 /t/unit-tests/t-urlmatch-normalization.c | |
parent | 1302ed68d4f5452242d47ac609b06b793a18ea0b (diff) |
reftable/stack: fix segfault when reload with reused readers fails
It is expected that reloading the stack fails with concurrent writers,
e.g. because a table that we just wanted to read just got compacted.
In case we decided to reuse readers this will cause a segfault though
because we unconditionally release all new readers, including the reused
ones. As those are still referenced by the current stack, the result is
that we will eventually try to dereference those already-freed readers.
Fix this bug by incrementing the refcount of reused readers temporarily.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/unit-tests/t-urlmatch-normalization.c')
0 files changed, 0 insertions, 0 deletions