Skip to content

MDEV-35717: UBSAN: runtime errors: applying [zero|non-zero] offset to null pointer#4910

Draft
raghunandanbhat wants to merge 1 commit into11.8from
11.8-mdev-35717
Draft

MDEV-35717: UBSAN: runtime errors: applying [zero|non-zero] offset to null pointer#4910
raghunandanbhat wants to merge 1 commit into11.8from
11.8-mdev-35717

Conversation

@raghunandanbhat
Copy link
Copy Markdown
Contributor

@raghunandanbhat raghunandanbhat commented Apr 7, 2026

fixes MDEV-35717

Problem:

UBSAN reports runtime errors in string comparision functions where pointer arithmetic is done without checking NULL.

  • runtime errors: applying zero offset to null pointer in my_strnncoll_utf8mb3_general1400_as_ci
  • runtime errors: applying non-zero offset 4 to null pointer in my_strcoll_ascii_4bytes_found

Fix:

Check pointers are not NULL before doing pointer arithmetic.

… null pointer

Problem:
  UBSAN reports runtime errors in string comparision functions where
  pointer arithmetic is done without checking NULL.

Fix:
  Check pointers are not NULL before doing pointer arithmetic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant