Bug #82889 DebugPrintDeathTest.PrintEval unit test fails on Aarch64.
Submitted: 7 Sep 2016 11:30 Modified: 16 Nov 2016 15:46
Reporter: Konstantin Chaplaev Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.7.14 OS:Any
Assigned to: CPU Architecture:Any

[7 Sep 2016 11:30] Konstantin Chaplaev
Description:
I tested it in 5.7.14, but may be true for older versions.

Commit 5c2b61d has brought two unit tests (DebugPrintTest and DebugPrintDeathTest) that use
"division by zero" exception to check the evaluation of args of DBUG_PRINT macro.

About division by zero C99 says in 6.5.5p5:  "... if the value of the second operand is zero,
the behavior is undefined".

Also, according to the ARMv8 Architecture Reference Manual if the divisor is zero, the result of
operation is zero and no exception is generated. Consequently, DebugPrintDeathTest.PrintEval test fails
and DebugPrintTest always passes at least on Aarch64.

How to repeat:
build a debug MySQL 5.7 binary
run make test
[9 Sep 2016 14:25] OCA Admin
Contribution submitted via Github - Bug #82889: DebugPrintDeathTest.PrintEval test failure. 
(*) Contribution by Alexey Kopytov (Github akopytov, mysql-server/pull/99#issuecomment-245614959): I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: git_patch_84487743.txt (text/plain), 1.86 KiB.

[10 Sep 2016 5:34] MySQL Verification Team
Thank you Konstantin for the report and Alexey Kopytov for the contribution.

Thanks,
Umesh
[16 Nov 2016 15:46] Paul DuBois
Posted by developer:
 
Noted in 5.6.36, 5.7.18, 8.0.1 changelogs.

The DebugPrintTest and DebugPrintDeathTest unit tests did not handle
divide-by-zero testing properly on the Aarch64 platform. Thanks to
Alexey Kopytov for the patch.