mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-13 11:22:01 +00:00
Said method is called in an allocating section, which will re-try the enclosed lambda on allocation failure. `read_context()` however moves the permit parameter so on the second and later calls, the permit will be in a moved-from state, triggering a `nullptr` dereference and therefore a segfault. We already have a unit test (`test_exception_safety_of_reads` in `row_cache_test.cc`) which was supposed to cover this, but: * It only tests range scans, not single partition reads, which is a separate path. * Turns out allocation failure tests are again silently broken (no error is injected at all). This is because `test/lib/memtable_snapshot_source.hh` creates a critical alloc section which accidentally covers the entire duration of tests using it. Fixes: #15578 Closes scylladb/scylladb#15614 * github.com:scylladb/scylladb: test/boost/row_cache_test: test_exception_safety_of_reads: also cover single-partition reads test/lib/memtable_snapshot_source: disable critical alloc section while waiting row_cache: make_reader_opt(): make make_context() reentrant