Bug #79352 DebugPrintDeathTest.PrintEval unit test fails under Mac, if built with ASan
Submitted: 20 Nov 2015 9:20 Modified: 17 Feb 2016 17:19
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.7.9 OS:MacOS (10.11.1)
Assigned to: CPU Architecture:Any

[20 Nov 2015 9:20] Laurynas Biveinis
Description:
$ ./unittest/gunit/dbug-t 
...
# Run 2 DebugPrintDeathTest.PrintEval
/Users/laurynas/percona/mysql-5.7.9/unittest/gunit/dbug-t.cc:98: FailureDeath test: do { if (_dbug_on_) { _db_pargs_(98,"never"); if (_db_enabled_()) { _db_doprnt_ ("%d",1/y); } } } while(0)
    Result: failed to die.
 Error msg:
[  DEATH   ] ?func: never: 121054405
[  DEATH   ] 
not ok 2
...

Only reproduced on Mac, only on ASan build.

$ clang -v
Apple LLVM version 7.0.0 (clang-700.1.76)
Target: x86_64-apple-darwin15.0.0
Thread model: posix

How to repeat:
cmake mysql-5.7.9 -DBUILD_CONFIG=mysql_release -DWITH_DEBUG=ON -DWITH_ASAN=ON -DENABLE_DOWNLOADS=ON -DWITH_BOOST=...
...
$ make dbug-t
...
$./unittest/gunit/dbug-t
[23 Nov 2015 13:38] MySQL Verification Team
Thank you for the bug report.

Scanning dependencies of target dbug-t
[100%] Building CXX object unittest/gunit/CMakeFiles/dbug-t.dir/dbug-t.cc.o
[100%] Linking CXX executable dbug-t
[100%] Built target dbug-t
miguel:~ miguel$ ./unittest/gunit/dbug-t
# Running 5 tests from 5 test cases
1..5
# Global test environment set-up
# Run 1 DebugDeathTest.Suicide
ok 1
# Run 2 DebugPrintDeathTest.PrintEval
/Users/miguel/mysql-5.7.9/unittest/gunit/dbug-t.cc:98: FailureDeath test: do { if (_dbug_on_) { _db_pargs_(98,"never"); if (_db_enabled_()) { _db_doprnt_ ("%d",1/y); } } } while(0)
    Result: failed to die.
 Error msg:
[  DEATH   ] ?func: never: 69684997
[  DEATH   ]
not ok 2
# Run 3 DebugFlushGcov.FlushGcovParallel
ok 3
# Run 4 DebugPrintTest.PrintEval
ok 4
# Run 5 DebugSetTest.DebugKeywordsTest
ok 5
# Global test environment tear-down
# Ran 5 tests from 5 test cases
# Passed 4 tests
# Failed 1 test
miguel:~ miguel$
[17 Feb 2016 17:19] Paul DuBois
Fixed in 5.7.12.

Changes for test suite. No changelog entry needed.