[MDEV-27030] vcol.vcol_keys_myisam fails on Windows x64, with Visual Studio 2022 Created: 2021-11-11 Updated: 2023-11-10 Resolved: 2021-11-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - MyISAM |
| Affects Version/s: | 10.3, 10.4, 10.5, 10.6, 10.7, 10.8 |
| Fix Version/s: | 10.2.42, 10.3.33, 10.4.23, 10.5.14, 10.6.6, 10.7.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Vladislav Vaintroub | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
Fails reproducibly, on x64 only . Seems to be a compiler bug, time-wise correlates with compiler upgrade.
|
| Comments |
| Comment by Vladislav Vaintroub [ 2021-11-11 ] | ||||||||
|
Localized a function in myisam, which , when deoptimized, lets the test pass. it is remove_key() in storage/myisam/mi_delete.c . I'm attaching annotated disassembly, in case anyone would like to analyze what the bug was or is. It is not entirely obvious to me, especially since register allocation is done slightly differently, and I'm not good enough to map r8d to eax or similar in my mind. | ||||||||
| Comment by Alexander Miloslavskiy [ 2023-11-10 ] | ||||||||
|
We also ran into this problem and analyzed it further. In your disassembly, the problem can be seen here:
It first loads *keypos into EAX and then assumes that *start is in EAX. See also https://stackoverflow.com/questions/77455281 I had a contact in Microsoft and he confirmed that this is a compiler bug and they will fix it now that I reported. | ||||||||
| Comment by Vladislav Vaintroub [ 2023-11-10 ] | ||||||||
|
Thanks alexandr.miloslavskiy for investigating! Interesting! If there is a link to the compiler bug report, it would be great if we had it, to track when it is fixed. | ||||||||
| Comment by Alexander Miloslavskiy [ 2023-11-10 ] | ||||||||
|
Here's the link: |