vinyl: fix crash in vy_read_iterator_next_range
There's no check that range->begin can be NULL (for the leftmost range) in vy_read_iterator_next_range(), which leads to a crash when trying to compare range->begin to last_stmt. Add it. #0 0x5621e45fc1b1 in print_backtrace+9 #1 0x5621e4507b9f in _ZL12sig_fatal_cbi+e2 #2 0x7f819188c0c0 in __restore_rt+0 #3 0x5621e456e34b in tuple_data+c #4 0x5621e456e814 in vy_tuple_compare_with_key+20 #5 0x5621e4570cec in vy_read_iterator_next_range+139 #6 0x5621e456fd87 in vy_read_iterator_next_key+275 #7 0x5621e45710ad in vy_read_iterator_next+22c #8 0x5621e453db42 in vinyl_iterator_next+19a #9 0x5621e4513772 in iterator_next+cb #10 0x5621e45afe4a in box_select+32d #11 0x5621e45d4beb in _ZL11lbox_selectP9lua_State+187 #12 0x5621e461c96b in lj_BC_FUNCC+34 #13 0x5621e463f4e3 in lua_pcall+18e #14 0x5621e45e870c in luaT_call+29 #15 0x5621e45e1ad7 in lua_fiber_run_f+c0 #16 0x5621e4507914 in _ZL16fiber_cxx_invokePFiP13__va_list_tagES0_+1e #17 0x5621e45f9ba1 in fiber_loop+82 #18 0x5621e479b31b in coro_init+4c Fixes 5e414a73 ("vinyl: read iterator: do not reopen all sources when range is changed") Closes #2990
Please register or sign in to comment