Bug #109928 Test crashes on Mac M1 chip
Submitted: 3 Feb 21:35 Modified: 11 Jun 12:40
Reporter: Justin Gossett Email Updates:
Status: No Feedback Impact on me:
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:8.0.32 OS:MacOS
Assigned to: MySQL Verification Team CPU Architecture:ARM (M1 Chip)

[3 Feb 21:35] Justin Gossett
Running the test t_bug34429 inside test module my_result1 using a Mac with an M1 chip will result in a crash.

The test t_bug34429 actually passes but then crashes after the test returns to the test framework.

I've observed that if you simply do not copy over the last byte during SQLGetData(), the crash goes away. The test will fail (because it's expecting that last byte) but the crash no longer happens. 
To verify this, edit driver/utility.cc line 621 and change it from `if (result && result == result_end)` to `if (result && result == result_end-1)`.
That -1 will cause the buffer copy to stop one byte sooner and the crash won't happen. Obviously this is not a solution but it's a clue for what's going on here.

How to repeat:
1. Edit test/my_result1.c and comment out lines 2257-2288 so that t_bug34429 is the only test that runs.
2. Run my_result1 and observe it crash.
[9 May 12:57] MySQL Verification Team
Hello Justin,

Thank you for the bug report.
Could you please provide more information to reproduce this issue at our end?

Ashwini Patil
[9 May 20:41] Justin Gossett
Hello Ashwini,

Initially I saw this bug on a Mac M1 VM and it was reliably reproducible there. We just tried reproducing this bug on a different Mac M1 machine and we were unable to reproduce it. If you are also unable to reproduce the bug on a M1 machine, then I was probably mistaken thinking this was a M1 issue.

[11 May 12:40] MySQL Verification Team
Hello Justin,

Thank you for the details.
Could you please provide detailed steps to reproduce this issue at our end?

Ashwini Patil
[12 Jun 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".