Details
Description
Compilation error during UB+ASAN builds using Clang 21.1.0:
CS 11.4.9 d098e615422266461b32c9922a1501d60a32f9d7 (Debug, UBASAN, Clang 21.1.0-20250811) Build 24/09/2025 |
/test/11.4_dbg_san/extra/comp_err.c:398:5: runtime error: store to misaligned address 0x7aa942e09026 for type 'uint32' (aka 'unsigned int'), which requires 4 byte alignment
|
0x7aa942e09026: note: pointer points here
|
02 05 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
^
|
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /test/11.4_dbg_san/extra/comp_err.c:398:5
|
Code:
extra/comp_err.c around line 398 |
/* continue with header of the errmsg.sys file */
|
length= (ulong) (my_ftell(to, MYF(0)) - HEADER_LENGTH -
|
(error_count + section_count) * 2);
|
bzero((uchar*) head, HEADER_LENGTH);
|
bmove((uchar*) head, (uchar*) file_head, 4);
|
head[4]= 1;
|
int4store(head + 6, length); <<<<<<<<<<<<< Line 398
|
int2store(head + 10, max_error); /* Max error */
|
int2store(head + 12, row_nr);
|
int2store(head + 14, section_count);
|
Attachments
Issue Links
- is part of
-
MDEV-25454 Make MariaDB server UBSAN safe
-
- Confirmed
-
- relates to
-
MDEV-37148 Unaligned access in strings/ctype.c, crashes with upcoming GCC 16 (or UBSAN)
-
- Open
-