mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-19 16:15:07 +00:00
Never trust Occam's Razor - it turns out that the use-after-free bug in the "exists" command was caused by two separate bugs. We fixed one in commit9636a33993, but there is a second one fixed in this patch. The problem fixed here was that a "service_permit" object, which is designed to be copied around from place to place (it contains a shared pointer, so is cheap to copy), was saved by reference, and the reference was to a function argument and was destroyed prematurely. This time I tested *many times* that that test_strings.py passes on both dev and debug builds. Note that test/run/redis still fails in a debug build, but due to a different problem. Fixes #6469 Signed-off-by: Nadav Har'El <nyh@scylladb.com> Reviewed-by: Benny Halevy <bhalevy@scylladb.com> Message-Id: <20200825183313.120331-1-nyh@scylladb.com> (cherry picked from commit868194cd17)