MDEV-28350: Test failing on buildbot with UBSAN
Analysis: There were two kinds of failing tests on buildbot with UBSAN. 1) runtime error: signed integer overflow and 2) runtime error: load of value is not valid value for type Signed integer overflow was occuring because addition of two integers (size of json array + item number in array) was causing overflow in json_path_parts_compare. This overflow happens because a->n_item_end wasn't set. The second error was occuring because c_path->p.types_used is not initialized but the value is used later on to check for negative path index. Fix: For signed integer overflow, use a->n_item_end only in case of range so that it is set.
Showing
Please register or sign in to comment