git/reftable
Patrick Steinhardt 85da2a2ab6 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>
2024-08-23 08:04:48 -07:00
..
LICENSE
…
basics.c global: improve const correctness when assigning string constants 2024-06-07 10:30:48 -07:00
basics.h global: improve const correctness when assigning string constants 2024-06-07 10:30:48 -07:00
block.c reftable/block: use `size_t` to track restart point index 2024-05-13 17:04:16 -07:00
block.h reftable: use `uint16_t` to track restart interval 2024-05-13 17:02:38 -07:00
block_test.c reftable/blocksource: drop malloc block source 2024-08-23 08:04:46 -07:00
blocksource.c reftable/blocksource: drop malloc block source 2024-08-23 08:04:46 -07:00
blocksource.h reftable/blocksource: drop malloc block source 2024-08-23 08:04:46 -07:00
constants.h reftable: make the compaction factor configurable 2024-05-13 17:02:39 -07:00
error.c Merge branch 'ps/reftable-write-optim' 2024-05-08 10:18:43 -07:00
iter.c reftable/generic: drop interface 2024-08-22 07:59:48 -07:00
iter.h reftable/generic: drop interface 2024-08-22 07:59:48 -07:00
merged.c reftable/generic: drop interface 2024-08-22 07:59:48 -07:00
merged.h reftable/merged: stop using generic tables in the merged table 2024-08-22 07:59:46 -07:00
pq.c reftable: allow inlining of a few functions 2024-03-04 10:19:49 -08:00
pq.h reftable: allow inlining of a few functions 2024-03-04 10:19:49 -08:00
pq_test.c reftable/merged: make subiters own their records 2024-03-04 10:19:39 -08:00
publicbasics.c reftable: introduce macros to allocate arrays 2024-02-06 12:10:08 -08:00
reader.c reftable/reader: keep readers alive during iteration 2024-08-23 08:04:47 -07:00
reader.h reftable/reader: introduce refcounting 2024-08-23 08:04:47 -07:00
readwrite_test.c reftable/reader: introduce refcounting 2024-08-23 08:04:47 -07:00
record.c t/helper: inline printing of reftable records 2024-08-22 07:59:47 -07:00
record.h t/helper: inline printing of reftable records 2024-08-22 07:59:47 -07:00
reftable-blocksource.h reftable: add blocksource, an abstraction for random access reads 2021-10-08 10:45:48 -07:00
reftable-error.h Merge branch 'ps/reftable-write-optim' 2024-05-08 10:18:43 -07:00
reftable-iterator.h reftable/generic: adapt interface to allow reuse of iterators 2024-05-13 17:04:18 -07:00
reftable-malloc.h reftable: utility functions 2021-10-08 10:45:48 -07:00
reftable-merged.h reftable/generic: drop interface 2024-08-22 07:59:48 -07:00
reftable-reader.h reftable/reader: introduce refcounting 2024-08-23 08:04:47 -07:00
reftable-record.h t/helper: inline printing of reftable records 2024-08-22 07:59:47 -07:00
reftable-stack.h t/helper: inline `reftable_stack_print_directory()` 2024-08-22 07:59:47 -07:00
reftable-tests.h t/helper: inline `reftable_dump_main()` 2024-08-22 07:59:47 -07:00
reftable-writer.h reftable: make the compaction factor configurable 2024-05-13 17:02:39 -07:00
stack.c reftable/stack: fix segfault when reload with reused readers fails 2024-08-23 08:04:48 -07:00
stack.h reftable: make the compaction factor configurable 2024-05-13 17:02:39 -07:00
stack_test.c reftable/stack: fix segfault when reload with reused readers fails 2024-08-23 08:04:48 -07:00
system.h hash-ll: merge with "hash.h" 2024-06-14 10:26:33 -07:00
test_framework.c reftable: honor core.fsync 2024-01-23 13:45:27 -08:00
test_framework.h reftable: honor core.fsync 2024-01-23 13:45:27 -08:00
tree.c reftable: introduce macros to allocate arrays 2024-02-06 12:10:08 -08:00
tree.h reftable: a generic binary tree implementation 2021-10-08 10:45:48 -07:00
tree_test.c treewide: remove unnecessary includes in source files 2023-12-26 12:04:31 -08:00
writer.c reftable/writer: improve error when passed an invalid block size 2024-05-13 17:02:38 -07:00
writer.h reftable: honor core.fsync 2024-01-23 13:45:27 -08:00