Skip to content
/ server Public

MDEV-38989 main.ctype_utf16le SEGV in Ubuntu 26.04 (x86-64-v3)#4742

Merged
dr-m merged 1 commit into10.6from
MDEV-38989
Mar 6, 2026
Merged

MDEV-38989 main.ctype_utf16le SEGV in Ubuntu 26.04 (x86-64-v3)#4742
dr-m merged 1 commit into10.6from
MDEV-38989

Conversation

@dr-m
Copy link
Contributor

@dr-m dr-m commented Mar 6, 2026

  • The Jira issue number for this PR is: MDEV-38989

Description

my_utf16le_uni(), my_lengthsp_utf16le(): Instead of wrongly claiming aligned access by invoking uint2korr(), inform the compiler of unaligned access by invoking memcpy(), which will be optimized away.

Release Notes

MariaDB Server could crash due to unaligned access when using the utf16le character set encoding.

How can this PR be tested?

mysql-test/mtr main.ctype_utf16le

Note: Given that IBM AIX is currently detached from https://buildbot.mariadb.org, the only big endian target that we exercise is IBM System Z (s390x).

Basing the PR against the correct MariaDB version

  • This is a new feature or a refactoring, and the PR is based against the main branch.
  • This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

my_utf16le_uni(), my_lengthsp_utf16le(): Instead of wrongly claiming
aligned access by invoking uint2korr(), inform the compiler of
unaligned access by invoking memcpy(), which will be optimized away.
@dr-m dr-m requested a review from abarkov March 6, 2026 07:42
@dr-m dr-m self-assigned this Mar 6, 2026
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@dr-m
Copy link
Contributor Author

dr-m commented Mar 6, 2026

https://buildbot.mariadb.org/#/builders/916/builds/8311 has passed the test main.ctype_utf16le:

main.ctype_utf16le                       w4 [ pass ]    534

Copy link
Contributor

@abarkov abarkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patch is OK to push.

@dr-m dr-m merged commit 6318d50 into 10.6 Mar 6, 2026
11 of 13 checks passed
@dr-m dr-m deleted the MDEV-38989 branch March 6, 2026 09:46
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.

3 participants