Bug #85671 segfault-t failing under recent AddressSanitizer

Submitted: 28 Mar 2017 11:43 Modified: 29 Mar 2017 13:38
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: System Severity:S3 (Non-critical)
Version:5.6+ OS:Any
Assigned to: CPU Architecture:Any
Tags: asan, unit tests

[28 Mar 2017 11:43] Laurynas Biveinis
Description:
5.6.35 on Ubuntu Yakkety, GCC compiler with ASan:

unittest/gunit/merge_large_tests-t 
...
# Run 3 FatalSignalDeathTest.Segfault
/home/laurynas/mysql-server/unittest/gunit/segfault-t.cc:66: FailureDeath test: *pint= 42
    Result: died but not with expected error.
  Expected: .*ASAN:SIGSEGV.*
Actual msg:
[  DEATH   ] ASAN:DEADLYSIGNAL
[  DEATH   ] =================================================================
[  DEATH   ] ==8818==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x5564895c0b0f bp 0x7fff12e59450 sp 0x7fff12e59280 T0)
[  DEATH   ]     #0 0x5564895c0b0e in segfault_unittest::FatalSignalDeathTest_Segfault_Test::TestBody() /home/laurynas/mysql-server/unittest/gunit/segfault-t.cc:66
[  DEATH   ]     #1 0x55648aa755c1 in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/laurynas/mysql-server/source_downloads/googletest-release-1.8.0/googletest/src/gtest.cc:2402
[  DEATH   ]     #2 0x55648aa755c1 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/laurynas/mysql-server/source_downloads/googletest-release-1.8.0/googletest/src/gtest.cc:2438
[  DEATH   ]     #3 0x55648aa6263e in testing::Test::Run() /home/laurynas/mysql-server/source_downloads/googletest-release-1.8.0/googletest/src/gtest.cc:2475
[  DEATH   ]     #4 0x55648aa628db in testing::TestInfo::Run() /home/laurynas/mysql-server/source_downloads/googletest-release-1.8.0/googletest/src/gtest.cc:2656
[  DEATH   ]     #5 0x55648aa62a62 in testing::TestCase::Run() /home/laurynas/mysql-server/source_downloads/googletest-release-1.8.0/googletest/src/gtest.cc:2774
[  DEATH   ]     #6 0x55648aa62fb0 in testing::internal::UnitTestImpl::RunAllTests() /home/laurynas/mysql-server/source_downloads/googletest-release-1.8.0/googletest/src/gtest.cc:4649
[  DEATH   ]     #7 0x55648aa76144 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/laurynas/mysql-server/source_downloads/googletest-release-1.8.0/googletest/src/gtest.cc:2402
[  DEATH   ]     #8 0x55648aa76144 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/laurynas/mysql-server/source_downloads/googletest-release-1.8.0/googletest/src/gtest.cc:2438
[  DEATH   ]     #9 0x55648aa6376c in testing::UnitTest::Run() /home/laurynas/mysql-server/source_downloads/googletest-release-1.8.0/googletest/src/gtest.cc:4257
[  DEATH   ]     #10 0x55648a14637b in RUN_ALL_TESTS() /home/laurynas/mysql-server/source_downloads/googletest-release-1.8.0/googletest/include/gtest/gtest.h:2233
[  DEATH   ]     #11 0x55648a14637b in main /home/laurynas/mysql-server/unittest/gunit/gunit_test_main_server.cc:72
[  DEATH   ]     #12 0x7f2f909f03f0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x203f0)
[  DEATH   ]     #13 0x556489563569 in _start (/home/laurynas/obj-percona-5.6-asan-debug/unittest/gunit/merge_large_tests-t+0x671569)
[  DEATH   ] 
[  DEATH   ] AddressSanitizer can not provide additional info.
[  DEATH   ] SUMMARY: AddressSanitizer: SEGV /home/laurynas/mysql-server/unittest/gunit/segfault-t.cc:66 in segfault_unittest::FatalSignalDeathTest_Segfault_Test::TestBody()
[  DEATH   ] ==8818==ABORTING
[  DEATH   ] 
not ok 3

How to repeat:
See above

Suggested fix:
Looks like both "ASAN:SIGSEGV" and "ASAN:DEADLYSIGNAL" should be expected
[28 Mar 2017 15:34] MySQL Verification Team
Hello Laurynas,

Thank you for the report and feedback.
Verified as described.

Thanks,
Umesh
[28 Mar 2017 15:34] MySQL Verification Team
test results

Attachment: 85671.results (application/octet-stream, text), 12.34 KiB.

[29 Mar 2017 13:38] Paul DuBois
Posted by developer:
 
Fixed in 5.6.37.

Work was done for test suite. No changelog entry needed.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.