pbxt crashes on Windows 64 (misalignment on SSE instruciton)
Bug #688404 reported by
Vladislav Vaintroub
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Critical
|
Vladislav Vaintroub | ||
PBXT |
Fix Committed
|
Undecided
|
Vladimir Kolesnikov |
Bug Description
In Maria 5.2 PBXT crashes directly on startup
with this callstack.
mysqld.
mysqld.
mysqld.
mysqld.
mysqld.
...
Disassembly reveals sse instruction that requires 16 bit aligment on misaligned address.
Related branches
lp:~vkolesnikov/pbxt/pbxt-bug-688404
- PBXT Core: Pending requested
-
Diff: 224 lines (+40/-9)12 files modifiedChangeLog (+1/-0)
src/cache_xt.cc (+5/-0)
src/discover_xt.cc (+1/-1)
src/ha_pbxt.cc (+2/-2)
src/heap_xt.cc (+1/-0)
src/lock_xt.cc (+5/-0)
src/lock_xt.h (+1/-0)
src/memory_xt.cc (+11/-0)
src/memory_xt.h (+6/-0)
src/table_xt.cc (+6/-4)
src/xaction_xt.cc (+0/-1)
src/xt_defs.h (+1/-1)
Changed in maria: | |
importance: | Undecided → High |
milestone: | none → 5.1 |
status: | New → Fix Committed |
Changed in pbxt: | |
assignee: | nobody → Vladimir Kolesnikov (vkolesnikov) |
status: | New → Fix Committed |
status: | Fix Committed → In Progress |
Changed in pbxt: | |
status: | In Progress → Fix Committed |
To post a comment you must log in.
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