Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
Description
In Maria 5.2 PBXT crashes directly on startup
with this callstack.
mysqld.exe!_setjmp()
mysqld.exe!xt_create_thread()[thread_xt.cc:1425]
mysqld.exe!xt_init_threading()[thread_xt.cc:1211]
mysqld.exe!pbxt_init()[ha_pbxt.cc:1203]
mysqld.exe!ha_initialize_handlerton()[handler.cc:431]
...
Disassembly reveals sse instruction that requires 16 bit aligment on misaligned address.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Re: pbxt crashes on Windows 64 (misalignment on SSE instruciton)
This affects debug compilation.
Analysis shows that the problematic area is memory debug functionality in PBXT that returns 8 byte aligned pointers (due to 8 byte prefix). The critical place here is
self = (XTThreadPtr) xt_calloc_ns(sizeof(XTThreadRec));
this returns 8 byte aligned (read 16 byte unaligned) pointer. This structure contains jmp_buf array, for which alignment requirements is 16 byte. When setjmp issues instruction which operates on 16 byte aligned memory, it crashes.
the instruction in question is
movdqa xmmword ptr [rcx+60h],xmm6