Skip to content

Instantly share code, notes, and snippets.

@sgraham
Created April 15, 2018 07:41
Show Gist options
  • Save sgraham/461f286144ef8c7e531dad75ec2960d1 to your computer and use it in GitHub Desktop.
Save sgraham/461f286144ef8c7e531dad75ec2960d1 to your computer and use it in GitHub Desktop.
asan repro output
[ RUN ] ServerTest.QuickStartStop
ASAN:DEADLYSIGNAL
=================================================================
==67127==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000109489ce4 bp 0x7000073218b0 sp 0x7000073216c0 T1)
==67127==The signal is caused by a READ memory access.
==67127==Hint: address points to the zero page.
#0 0x109489ce3 in httplib::detail::select_read(int, unsigned long, unsigned long) httplib.h:431
#1 0x1095aefc2 in httplib::Server::listen(char const*, int, int) httplib.h:1418
#2 0x1095aec15 in ServerTest::SetUp()::'lambda'()::operator()() const test.cc:327
#3 0x1095ae717 in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, ServerTest::SetUp()::'lambda'()> >(void*) thread:346
#4 0x7fff580456c0 in _pthread_body (libsystem_pthread.dylib:x86_64+0x36c0)
#5 0x7fff5804556c in _pthread_start (libsystem_pthread.dylib:x86_64+0x356c)
#6 0x7fff58044c5c in thread_start (libsystem_pthread.dylib:x86_64+0x2c5c)
Not for commit, asan crash repro
==67127==Register values:
rax = 0x0000100000000000 rbx = 0x00007000073217a0 rcx = 0x000000000000001f rdx = 0x04001e0000e642db
rdi = 0x0000000080000000 rsi = 0x20007000073216dc rbp = 0x00007000073218b0 rsp = 0x00007000073216c0
r8 = 0x0000000000000001 r9 = 0xffffe1ffff19bd28 r10 = 0x00001e0000e642ec r11 = 0x0000000000000004
r12 = 0x0000700007321780 r13 = 0x0000000000000000 r14 = 0x00000001096c4fd1 r15 = 0x00007000073216e0
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV httplib.h:431 in httplib::detail::select_read(int, unsigned long, unsigned long)
Thread T1 created by T0 here:
#0 0x109884676 in wrap_pthread_create (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x50676)
#1 0x1095ad837 in std::__1::thread::thread<ServerTest::SetUp()::'lambda'(), void>(ServerTest::SetUp()::'lambda'()&&) thread:362
#2 0x10957336c in std::__1::thread::thread<ServerTest::SetUp()::'lambda'(), void>(ServerTest::SetUp()::'lambda'()&&) thread:354
#3 0x109450926 in ServerTest::SetUp() test.cc:326
#4 0x109676a5e in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) gtest-all.cc:3394
#5 0x10960cf13 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) gtest-all.cc:3430
#6 0x10960c772 in testing::Test::Run() gtest-all.cc:3461
#7 0x10960fcd8 in testing::TestInfo::Run() gtest-all.cc:3642
#8 0x109613bb9 in testing::TestCase::Run() gtest-all.cc:3749
#9 0x109629475 in testing::internal::UnitTestImpl::RunAllTests() gtest-all.cc:5541
#10 0x1096867d9 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) gtest-all.cc:3394
#11 0x10962844a in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) gtest-all.cc:3430
#12 0x109627ff5 in testing::UnitTest::Run() gtest-all.cc:5175
#13 0x10969a278 in main gtest_main.cc:38
#14 0x7fff57dba114 in start (libdyld.dylib:x86_64+0x1114)
==67127==ABORTING
make: *** [all] Abort trap: 6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment