MDEV-38669: ASAN fail in Item_func_collect::add during ST_COLLECT#5247
MDEV-38669: ASAN fail in Item_func_collect::add during ST_COLLECT#5247DaveGosselin-MariaDB wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request addresses MDEV-38669, where ST_COLLECT could read past the end of a non-geometry argument, by introducing a helper method Geometry::is_valid_geometry_length to validate geometry buffer lengths. However, the review highlights an inconsistency: short invalid geometries are silently ignored during aggregation, whereas longer invalid geometries pass the initial length check and cause the aggregate to fail later. It is recommended to handle all invalid geometries consistently and add mixed-validity test cases.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
st_collect read past the end of its input because it assumed that the input was a valid geometry. Check that the length of the input is at least long enough to possibly contain a valid geometry.
a56f974 to
a344f1d
Compare
st_collect read past the end of its input because it assumed that the input was a valid geometry. Check that the length of the input is at least long enough to possibly contain a valid geometry.