Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test fails on Ubuntu 14.04 #9

Closed
LinusU opened this issue Sep 21, 2015 · 2 comments
Closed

Test fails on Ubuntu 14.04 #9

LinusU opened this issue Sep 21, 2015 · 2 comments

Comments

@LinusU
Copy link

LinusU commented Sep 21, 2015

Lib version
wangle v0.13.0
folly v0.57.0
Test project /home/ubuntu/facebook/wangle/wangle
      Start  1: BootstrapTest
 1/11 Test  #1: BootstrapTest ....................   Passed    0.63 sec
      Start  2: OutputBufferingHandlerTest
 2/11 Test  #2: OutputBufferingHandlerTest .......   Passed    0.01 sec
      Start  3: PipelineTest
 3/11 Test  #3: PipelineTest .....................   Passed    0.01 sec
      Start  4: CodecTest
 4/11 Test  #4: CodecTest ........................***Failed    0.01 sec
      Start  5: CodelTest
 5/11 Test  #5: CodelTest ........................   Passed    0.40 sec
      Start  6: GlobalExecutorTest
 6/11 Test  #6: GlobalExecutorTest ...............   Passed    0.01 sec
      Start  7: ThreadPoolExecutorTest
 7/11 Test  #7: ThreadPoolExecutorTest ...........   Passed    0.72 sec
      Start  8: RxTest
 8/11 Test  #8: RxTest ...........................   Passed    0.01 sec
      Start  9: ServiceTest
 9/11 Test  #9: ServiceTest ......................***Exception: SegFault  0.13 sec
      Start 10: SSLCacheTest
10/11 Test #10: SSLCacheTest .....................***Failed    0.01 sec
      Start 11: SSLContextManagerTest
11/11 Test #11: SSLContextManagerTest ............   Passed    0.01 sec

73% tests passed, 3 tests failed out of 11

Total Test time (real) =   1.94 sec

The following tests FAILED:
      4 - CodecTest (Failed)
      9 - ServiceTest (SEGFAULT)
     10 - SSLCacheTest (Failed)
@lixiangnlp lixiangnlp mentioned this issue Nov 10, 2015
@djwatson
Copy link

djwatson commented Dec 8, 2015

Tests disabled. Thanks

@djwatson djwatson closed this as completed Dec 8, 2015
ghost pushed a commit that referenced this issue Aug 17, 2016
Summary:
```
      ☢ wangle/service:ServiceTest - Wangle.ClientServerTest 1.799s (FATAL)
Failed to find test summary. This test binary may have crashed mid-run. Full output follows:
Note: Google Test filter = Wangle.ClientServerTest
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from Wangle
[ RUN      ] Wangle.ClientServerTest
=================================================================
==2396362==ERROR: AddressSanitizer: heap-use-after-free on address 0x611000000568 at pc 0x000000481dfc bp 0x7fff7d9c2eb0 sp 0x7fff7d9c2ea8
=== How to use this, how to get the raw stack trace, and more: fburl.com/ASAN ===
W0812 19:22:04.903192 2396422 HandlerContext-inl.h:177] readEOF reached end of pipeline
READ of size 8 at 0x611000000568 thread T0
     #2 wangle/channel/Pipeline-inl.h:72         wangle::PipelineBase& wangle::PipelineBase::removeHelper<...>(wangle::ClientDispatcherBase<...>*, bool)
     #3 wangle/channel/Pipeline-inl.h:97         wangle::PipelineBase& wangle::PipelineBase::remove<...>(wangle::ClientDispatcherBase<...>*)
     #4 wangle/service/ClientDispatcher.h:27     wangle::ClientDispatcherBase<...>::~ClientDispatcherBase()
     #5 wangle/service/ClientDispatcher.h:63     wangle::SerialClientDispatcher<...>::~SerialClientDispatcher()
     #6 wangle/service/ServiceTest.cpp:89        wangle::ClientServiceFactory<...>::ClientService::~ClientService()
    #13 folly/Traits.h:279                       std::shared_ptr<...>::~shared_ptr()
    #14 wangle/service/ServiceTest.cpp:135       wangle::Wangle_ClientServerTest_Test::TestBody()
    #25 common/gtest/LightMain.cpp:9             main

0x611000000568 is located 40 bytes inside of 200-byte region [0x611000000540,0x611000000608)
freed by thread T0 here:
     #0 ServiceTest+0x59d790                     operator delete(void*)
     #1 wangle/channel/Pipeline-inl.h:26         wangle::Pipeline<...>::~Pipeline()
     #6 folly/Traits.h:279                       std::shared_ptr<...>::~shared_ptr()
     #7 wangle/bootstrap/BaseClientBootstrap.h:31 wangle::BaseClientBootstrap<...>::~BaseClientBootstrap()
     #8 wangle/bootstrap/ClientBootstrap.h:100   wangle::ClientBootstrap<...>::~ClientBootstrap()
    #16 wangle/service/ServiceTest.cpp:134       wangle::Wangle_ClientServerTest_Test::TestBody()
    #27 common/gtest/LightMain.cpp:9             main

previously allocated by thread T0 here:
     #0 ServiceTest+0x59d150                     operator new(unsigned long)
     #1 wangle/channel/Pipeline.h:167            wangle::Pipeline<...>::create()
     #2 wangle/service/ServiceTest.cpp:77        wangle::ClientPipelineFactory<...>::newPipeline(std::shared_ptr<...>)
     #3 wangle/bootstrap/BaseClientBootstrap.h:59 wangle::BaseClientBootstrap<...>::makePipeline(std::shared_ptr<...>)
     #4 wangle/bootstrap/ClientBootstrap.h:94    wangle::ClientBootstrap<...>::connect(folly::SocketAddress const&, std::chrono::duration<...>)::{lambda()#1}::operator()() const
     #5 folly/Function.h:290                     void folly::detail::function::FunctionTraits<...>::callSmall<...>(folly::detail::function::Data&)
     #6 folly/async/EventBase.cpp:629            folly::detail::function::FunctionTraits<...>::operator()()
     #8 wangle/bootstrap/ClientBootstrap.h:76    wangle::ClientBootstrap<...>::connect(folly::SocketAddress const&, std::chrono::duration<...>)
     #9 wangle/service/ServiceTest.cpp:123       wangle::Wangle_ClientServerTest_Test::TestBody()
    #20 common/gtest/LightMain.cpp:9             main

: AddressSanitizer: heap-use-after-free third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_vector.h:267 in std::vector<std::shared_ptr<wangle::PipelineContext>, std::allocator<std::shared_ptr<wangle::PipelineContext> > >::_M_is_valid() const
Shadow bytes around the buggy address:
  0x0c227fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c227fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c227fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c227fff8080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c227fff8090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c227fff80a0: fa fa fa fa fa fa fa fa fd fd fd fd fd[fd]fd fd
  0x0c227fff80b0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c227fff80c0: fd fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c227fff80d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c227fff80e0: 00 00 00 00 00 00 00 00 00 fa fa fa fa fa fa fa
  0x0c227fff80f0: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==2396362==ABORTING
      ✓ wangle/service:ServiceTest - main 0.000s (PASS)
Summary (total time 1.91s):
  PASS: 9
  FAIL: 0
  SKIP: 0
  FATAL: 1
    wangle/service:ServiceTest - Wangle.ClientServerTest
  TIMEOUT: 0
  OMIT: 0
```

Differential Revision: D3714069

fbshipit-source-id: 178f11795a12742c5b2eee5179375c250758daba
facebook-github-bot pushed a commit that referenced this issue May 15, 2017
Summary:
[Wangle] Fix ASAN-reported `heap-use-after-free` in `FilePoller`.

The problem is that if the polling function is currently running while `FilePoller` dtor is called, then the polling function will continue to run to completion, which may include referencing into the destructed `FilePoller`. We must ensure that the polling function is not running between cancelling it and destructing the `FilePoller` instance.

Discovered while running some unrelated test case from some unrelated internal project with ASAN. A cleaned-up version of the ASAN report follows:
```lang=none
ERROR: AddressSanitizer: heap-use-after-free
READ of size 8 at 0x602000008370 thread T2 (file-poller)
     #4 wangle/util/FilePoller.cpp:90            wangle::FilePoller::checkFiles()
     #5 wangle/util/FilePoller.cpp:69            wangle::FilePoller::init(std::chrono::duration<...>)::$_2::operator()() const
     #6 folly/Function.h:298                     void folly::detail::function::FunctionTraits<...>::callSmall<...>(folly::detail::function::Data&)
     #7 folly/Function.h:314                     folly::detail::function::FunctionTraits<...>::operator()()
     #8 folly/experimental/FunctionScheduler.cpp:432 folly::FunctionScheduler::runOneFunction(std::unique_lock<...>&, std::chrono::time_point<...>)
     #9 folly/experimental/FunctionScheduler.cpp:384 folly::FunctionScheduler::run()
    #10 folly/experimental/FunctionScheduler.cpp:334 folly::FunctionScheduler::start()::$_2::operator()() const

0x602000008370 is located 0 bytes inside of 16-byte region [0x602000008370,0x602000008380)
freed by thread T0 here:
     #0 ??:?                                     operator delete(void*)
     #5 wangle/util/FilePoller.h:97              wangle::FilePoller::FileData::~FileData()
     #6 folly/Traits.h:475                       std::pair<...>::~pair()
    #14 wangle/util/FilePoller.cpp:59            wangle::FilePoller::~FilePoller()
    #15 wangle/util/FilePoller.cpp:59            wangle::FilePoller::~FilePoller()
    #18 thrift/lib/cpp2/security/SecurityKillSwitchPoller.cpp:64 apache::thrift::SecurityKillSwitchPoller::~SecurityKillSwitchPoller()
    #19 thrift/lib/cpp2/server/ThriftServer.cpp:150 apache::thrift::ThriftServer::~ThriftServer()
    #26 folly/Traits.h:498                       std::shared_ptr<...>::~shared_ptr()
    #27 thrift/lib/cpp2/util/ScopedServerInterfaceThread.h:36 apache::thrift::ScopedServerInterfaceThread::~ScopedServerInterfaceThread()

previously allocated by thread T0 here:
     #0 ??:?                                     operator new(unsigned long)
     #4 wangle/util/FilePoller.h:99              wangle::FilePoller::FileData::FileData(std::function<...>, std::function<...>, std::function<...>)
     #5 wangle/util/FilePoller.cpp:117           wangle::FilePoller::addFileToTrack(std::__cxx11::basic_string<...> const&, std::function<...>, std::function<...>, std::function<...>)
     #6 thrift/lib/cpp2/security/SecurityKillSwitchPoller.cpp:50 apache::thrift::SecurityKillSwitchPoller::SecurityKillSwitchPoller(bool)
     #7 thrift/lib/cpp2/security/SecurityKillSwitchPoller.cpp:42 apache::thrift::SecurityKillSwitchPoller::SecurityKillSwitchPoller()
     #8 thrift/lib/cpp2/server/ThriftServer.cpp:95 apache::thrift::ThriftServer::ThriftServer(std::__cxx11::basic_string<...> const&, bool)
     #9 thrift/lib/cpp2/server/ThriftServer.cpp:93 apache::thrift::ThriftServer::ThriftServer()
    #18 thrift/lib/cpp2/util/ScopedServerInterfaceThread.cpp:35 apache::thrift::ScopedServerInterfaceThread::ScopedServerInterfaceThread(std::shared_ptr<...>, folly::SocketAddress const&, folly::Function<...>)
    #19 thrift/lib/cpp2/util/ScopedServerInterfaceThread.cpp:52 apache::thrift::ScopedServerInterfaceThread::ScopedServerInterfaceThread(std::shared_ptr<...>, std::__cxx11::basic_string<...> const&, unsigned short, folly::Function<...>)

Thread T2 (file-poller) created by T0 here:
     #0 ??:?                                     pthread_create
     #4 folly/experimental/FunctionScheduler.cpp:334 folly::FunctionScheduler::start()
     #5 wangle/util/FilePoller.cpp:28            wangle::(anonymous namespace)::PollerContext::PollerContext()
     #6 wangle/util/FilePoller.cpp:45            wangle::(anonymous namespace)::$_0::operator()() const
     #9 folly/Singleton-inl.h:258                folly::detail::SingletonHolder<...>::createInstance()
    #10 folly/Singleton-inl.h:123                folly::detail::SingletonHolder<...>::try_get()
    #11 folly/Singleton.h:564                    folly::Singleton<...>::try_get()
    #12 wangle/util/FilePoller.cpp:62            wangle::FilePoller::init(std::chrono::duration<...>)
    #13 wangle/util/FilePoller.cpp:56            wangle::FilePoller::FilePoller(std::chrono::duration<...>)
    #15 thrift/lib/cpp2/security/SecurityKillSwitchPoller.cpp:45 apache::thrift::SecurityKillSwitchPoller::SecurityKillSwitchPoller(bool)
    #16 thrift/lib/cpp2/security/SecurityKillSwitchPoller.cpp:42 apache::thrift::SecurityKillSwitchPoller::SecurityKillSwitchPoller()
    #17 thrift/lib/cpp2/server/ThriftServer.cpp:95 apache::thrift::ThriftServer::ThriftServer(std::__cxx11::basic_string<...> const&, bool)
    #18 thrift/lib/cpp2/server/ThriftServer.cpp:93 apache::thrift::ThriftServer::ThriftServer()
    #27 thrift/lib/cpp2/util/ScopedServerInterfaceThread.cpp:35 apache::thrift::ScopedServerInterfaceThread::ScopedServerInterfaceThread(std::shared_ptr<...>, folly::SocketAddress const&, folly::Function<...>)
    #28 thrift/lib/cpp2/util/ScopedServerInterfaceThread.cpp:52 apache::thrift::ScopedServerInterfaceThread::ScopedServerInterfaceThread(std::shared_ptr<...>, std::__cxx11::basic_string<...> const&, unsigned short, folly::Function<...>)
```

Reviewed By: siyengar

Differential Revision: D5059743

fbshipit-source-id: b8de4c3c86a36c747efe31875ed712a4b77ce7af
@km4arr
Copy link

km4arr commented Jun 21, 2017

osx MacOS Sierra 10.12
5 - BootstrapTest (Failed)
7 - BroadcastPoolTest (Failed)

Start 1: AcceptorTest
1/22 Test #1: AcceptorTest ......................... Passed 0.08 sec
Start 2: ConnectionManagerTest
2/22 Test #2: ConnectionManagerTest ................ Passed 0.49 sec
Start 3: LoadShedConfigurationTest
3/22 Test #3: LoadShedConfigurationTest ............ Passed 0.04 sec
Start 4: PeekingAcceptorHandshakeHelperTest
4/22 Test #4: PeekingAcceptorHandshakeHelperTest ... Passed 0.08 sec
Start 5: BootstrapTest
5/22 Test #5: BootstrapTest ........................***Failed 0.77 sec
Start 6: BroadcastHandlerTest
6/22 Test #6: BroadcastHandlerTest ................. Passed 0.04 sec
Start 7: BroadcastPoolTest
7/22 Test #7: BroadcastPoolTest ....................***Failed 0.09 sec
Start 8: ObservingHandlerTest
8/22 Test #8: ObservingHandlerTest ................. Passed 0.06 sec
Start 9: AsyncSocketHandlerTest
9/22 Test #9: AsyncSocketHandlerTest ............... Passed 0.04 sec
Start 10: OutputBufferingHandlerTest
10/22 Test #10: OutputBufferingHandlerTest ........... Passed 0.05 sec
Start 11: PipelineTest
11/22 Test #11: PipelineTest ......................... Passed 0.84 sec
Start 12: CodecTest
12/22 Test #12: CodecTest ............................ Passed 0.05 sec
Start 13: AsyncTest
13/22 Test #13: AsyncTest ............................ Passed 0.08 sec
Start 14: CodelTest
14/22 Test #14: CodelTest ............................ Passed 0.64 sec
Start 15: GlobalExecutorTest
15/22 Test #15: GlobalExecutorTest ................... Passed 0.11 sec
Start 16: SerialExecutorTest
16/22 Test #16: SerialExecutorTest ................... Passed 0.98 sec
Start 17: ThreadedExecutorTest
17/22 Test #17: ThreadedExecutorTest ................. Passed 0.45 sec
Start 18: ThreadPoolExecutorTest
18/22 Test #18: ThreadPoolExecutorTest ............... Passed 3.67 sec
Start 19: RxTest
19/22 Test #19: RxTest ............................... Passed 0.03 sec
Start 20: SSLContextManagerTest
20/22 Test #20: SSLContextManagerTest ................ Passed 0.03 sec
Start 21: TLSCredProcessorTest
21/22 Test #21: TLSCredProcessorTest ................. Passed 20.03 sec
Start 22: FilePollerTest
22/22 Test #22: FilePollerTest ....................... Passed 1.42 sec

91% tests passed, 2 tests failed out of 22

facebook-github-bot pushed a commit that referenced this issue Dec 19, 2017
Summary:
This diff fixes the following memory leak:

```
xbu@devvm149:[~/fbsource/fbcode]: ASAN_OPTIONS=detect_leaks=1 buck test mode/dbg-asan wangle/acceptor/... -- --gtest-verbose-level 4 --no-print-passing --extended-tests
Building: finished in 0.6 sec (100%) 313/313 jobs, 0 updated, 0.0% cache miss
  Total time: 1.3 sec
TestPilot test runner for Facebook. See https://fburl.com/testpilot for details.
Testpilot build a22a8825fb55ce2ee4f36dd7a7705c900fc0d0b8 at Fri Dec 15 09:19:24 2017 by lpetre from /usr/local/fbprojects/packages/testinfra.testpilot/370/t.par
Trace available for this run at /tmp/testpilot.20171218-123822.3529484.log
Discovering tests
Running 45 tests
Started new test run: https://our.intern.facebook.com/intern/testinfra/testrun/805811534
      ☢ wangle/acceptor/test:EvbHandshakeHelperTest - EvbHandshakeHelperTest.TestDropConnection 0.008s 45/45 (FATAL)
Test appears to have passed but the binary exited with non-zero exit code 1.
This usually means something has crashed after the test was done.
Unfiltered output from the test binary:

Note: Google Test filter = EvbHandshakeHelperTest.TestDropConnection
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from EvbHandshakeHelperTest
[ RUN      ] EvbHandshakeHelperTest.TestDropConnection
[       OK ] EvbHandshakeHelperTest.TestDropConnection (8 ms)
[----------] 1 test from EvbHandshakeHelperTest (8 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (8 ms total)
[  PASSED  ] 1 test.

=================================================================
==3529740==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 2848 byte(s) in 1 object(s) allocated from:
    #0 0xe08a18 in operator new(unsigned long) (/data/users/xbu/fbsource/fbcode/buck-out/dbg-asan/gen/wangle/acceptor/test/EvbHandshakeHelperTest+0xe08a18)
    #1 0x4706f8 in EvbHandshakeHelperTest::SetUp()::{lambda()#1}::operator()() const wangle/acceptor/test/EvbHandshakeHelperTest.cpp:43
    #2 0x470454 in void folly::detail::function::FunctionTraits<void ()>::callSmall<EvbHandshakeHelperTest::SetUp()::{lambda()#1}>(folly::detail::function::Data&) folly/Function.h:314
    #3 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #4 0x785481 in folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3::operator()() folly/io/async/EventBase.cpp:581
    #5 0x78517f in void folly::detail::function::FunctionTraits<void ()>::callBig<folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3>(folly::detail::function::Data&) folly/Function.h:321
    #6 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #7 0x7a56bd in folly::EventBase::FunctionRunner::messageAvailable(folly::Function<void ()>&&) folly/io/async/EventBase.cpp:59
    #8 0x79628c in folly::NotificationQueue<folly::Function<void ()> >::Consumer::consumeMessages(bool, unsigned long*) folly/io/async/NotificationQueue.h:703
    #9 0x7a5701 in folly::NotificationQueue<folly::Function<void ()> >::Consumer::handlerReady(unsigned short) folly/io/async/NotificationQueue.h:640
    #10 0x7b0864 in folly::EventHandler::libeventCallback(int, short, void*) folly/io/async/EventHandler.cpp:160
    #11 0xfb0cb8 in event_process_active /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:390
    #12 0xfb0f7f in event_base_loop /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:532
    #13 0x77c545 in folly::EventBase::loopBody(int) folly/io/async/EventBase.cpp:314
    #14 0x77b366 in folly::EventBase::loop() folly/io/async/EventBase.cpp:253
    #15 0x77fffd in folly::EventBase::loopForever() folly/io/async/EventBase.cpp:451
    #16 0x4e6ad4 in folly::run(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&) folly/io/async/ScopedEventBaseThread.cpp:40
    #17 0x4ef13c in void std::_Bind_simple<void (*(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*>))(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&)>::_M_invoke<0ul, 1ul, 2ul, 3ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/functional:1530
    #18 0x4ef004 in std::_Bind_simple<void (*(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*>))(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&)>::operator()() third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/functional:1520
    #19 0x4ee828 in std::thread::_Impl<std::_Bind_simple<void (*(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*>))(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&)> >::_M_run() third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/thread:115
    #20 0x7f4ab08d9170 in execute_native_thread_routine /home/engshare/third-party2/libgcc/5.x/src/gcc-5/x86_64-facebook-linux/libstdc++-v3/src/c++11/../../../.././libstdc++-v3/src/c++11/thread.cc:84
    #21 0x7f4aafdba7a8 in start_thread /home/engshare/third-party2/glibc/2.23/src/glibc-2.23/nptl/pthread_create.c:333

Indirect leak of 1024 byte(s) in 1 object(s) allocated from:
    #0 0xecfc60 in realloc (/data/users/xbu/fbsource/fbcode/buck-out/dbg-asan/gen/wangle/acceptor/test/EvbHandshakeHelperTest+0xecfc60)
    #1 0x7f4ab0e293fb in CRYPTO_realloc /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/mem.c:379
    #2 0x7f4ab0efc144 in sk_dup /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/stack/stack.c:99
    #3 0x7f4ab12a93d3 in ssl_create_cipher_list /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/ssl/ssl_ciph.c:1678
    #4 0x7f4ab12a0753 in SSL_CTX_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/ssl/ssl_lib.c:2053
    #5 0x6ebf18 in folly::SSLContext::SSLContext(folly::SSLContext::SSLVersion) folly/io/async/SSLContext.cpp:39
    #6 0x472c22 in void __gnu_cxx::new_allocator<folly::SSLContext>::construct<folly::SSLContext>(folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/ext/new_allocator.h:120
    #7 0x4727d7 in void std::allocator_traits<std::allocator<folly::SSLContext> >::construct<folly::SSLContext>(std::allocator<folly::SSLContext>&, folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/alloc_traits.h:517
    #8 0x4722cc in std::_Sp_counted_ptr_inplace<folly::SSLContext, std::allocator<folly::SSLContext>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<>(std::allocator<folly::SSLContext>) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:522
    #9 0x471db1 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<folly::SSLContext, std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, folly::SSLContext*, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:617
    #10 0x471b13 in std::__shared_ptr<folly::SSLContext, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:1096
    #11 0x471ab7 in std::shared_ptr<folly::SSLContext>::shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:319
    #12 0x471a3b in std::shared_ptr<folly::SSLContext> std::allocate_shared<folly::SSLContext, std::allocator<folly::SSLContext>>(std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:619
    #13 0x470d6a in std::shared_ptr<folly::SSLContext> std::make_shared<folly::SSLContext>() third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:635
    #14 0x47071d in EvbHandshakeHelperTest::SetUp()::{lambda()#1}::operator()() const wangle/acceptor/test/EvbHandshakeHelperTest.cpp:43
    #15 0x470454 in void folly::detail::function::FunctionTraits<void ()>::callSmall<EvbHandshakeHelperTest::SetUp()::{lambda()#1}>(folly::detail::function::Data&) folly/Function.h:314
    #16 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #17 0x785481 in folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3::operator()() folly/io/async/EventBase.cpp:581
    #18 0x78517f in void folly::detail::function::FunctionTraits<void ()>::callBig<folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3>(folly::detail::function::Data&) folly/Function.h:321
    #19 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #20 0x7a56bd in folly::EventBase::FunctionRunner::messageAvailable(folly::Function<void ()>&&) folly/io/async/EventBase.cpp:59
    #21 0x79628c in folly::NotificationQueue<folly::Function<void ()> >::Consumer::consumeMessages(bool, unsigned long*) folly/io/async/NotificationQueue.h:703
    #22 0x7a5701 in folly::NotificationQueue<folly::Function<void ()> >::Consumer::handlerReady(unsigned short) folly/io/async/NotificationQueue.h:640
    #23 0x7b0864 in folly::EventHandler::libeventCallback(int, short, void*) folly/io/async/EventHandler.cpp:160
    #24 0xfb0cb8 in event_process_active /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:390
    #25 0xfb0f7f in event_base_loop /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:532
    #26 0x77c545 in folly::EventBase::loopBody(int) folly/io/async/EventBase.cpp:314
    #27 0x77b366 in folly::EventBase::loop() folly/io/async/EventBase.cpp:253
    #28 0x77fffd in folly::EventBase::loopForever() folly/io/async/EventBase.cpp:451
    #29 0x4e6ad4 in folly::run(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&) folly/io/async/ScopedEventBaseThread.cpp:40

Indirect leak of 1024 byte(s) in 1 object(s) allocated from:
    #0 0xecfc60 in realloc (/data/users/xbu/fbsource/fbcode/buck-out/dbg-asan/gen/wangle/acceptor/test/EvbHandshakeHelperTest+0xecfc60)
    #1 0x7f4ab0e293fb in CRYPTO_realloc /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/mem.c:379
    #2 0x7f4ab0efbf37 in sk_insert /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/stack/stack.c:186
    #3 0x7f4ab12a93ba in ssl_create_cipher_list /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/ssl/ssl_ciph.c:1670
    #4 0x7f4ab12a0753 in SSL_CTX_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/ssl/ssl_lib.c:2053
    #5 0x6ebf18 in folly::SSLContext::SSLContext(folly::SSLContext::SSLVersion) folly/io/async/SSLContext.cpp:39
    #6 0x472c22 in void __gnu_cxx::new_allocator<folly::SSLContext>::construct<folly::SSLContext>(folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/ext/new_allocator.h:120
    #7 0x4727d7 in void std::allocator_traits<std::allocator<folly::SSLContext> >::construct<folly::SSLContext>(std::allocator<folly::SSLContext>&, folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/alloc_traits.h:517
    #8 0x4722cc in std::_Sp_counted_ptr_inplace<folly::SSLContext, std::allocator<folly::SSLContext>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<>(std::allocator<folly::SSLContext>) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:522
    #9 0x471db1 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<folly::SSLContext, std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, folly::SSLContext*, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:617
    #10 0x471b13 in std::__shared_ptr<folly::SSLContext, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:1096
    #11 0x471ab7 in std::shared_ptr<folly::SSLContext>::shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:319
    #12 0x471a3b in std::shared_ptr<folly::SSLContext> std::allocate_shared<folly::SSLContext, std::allocator<folly::SSLContext>>(std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:619
    #13 0x470d6a in std::shared_ptr<folly::SSLContext> std::make_shared<folly::SSLContext>() third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:635
    #14 0x47071d in EvbHandshakeHelperTest::SetUp()::{lambda()#1}::operator()() const wangle/acceptor/test/EvbHandshakeHelperTest.cpp:43
    #15 0x470454 in void folly::detail::function::FunctionTraits<void ()>::callSmall<EvbHandshakeHelperTest::SetUp()::{lambda()#1}>(folly::detail::function::Data&) folly/Function.h:314
    #16 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #17 0x785481 in folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3::operator()() folly/io/async/EventBase.cpp:581
    #18 0x78517f in void folly::detail::function::FunctionTraits<void ()>::callBig<folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3>(folly::detail::function::Data&) folly/Function.h:321
    #19 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #20 0x7a56bd in folly::EventBase::FunctionRunner::messageAvailable(folly::Function<void ()>&&) folly/io/async/EventBase.cpp:59
    #21 0x79628c in folly::NotificationQueue<folly::Function<void ()> >::Consumer::consumeMessages(bool, unsigned long*) folly/io/async/NotificationQueue.h:703
    #22 0x7a5701 in folly::NotificationQueue<folly::Function<void ()> >::Consumer::handlerReady(unsigned short) folly/io/async/NotificationQueue.h:640
    #23 0x7b0864 in folly::EventHandler::libeventCallback(int, short, void*) folly/io/async/EventHandler.cpp:160
    #24 0xfb0cb8 in event_process_active /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:390
    #25 0xfb0f7f in event_base_loop /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:532
    #26 0x77c545 in folly::EventBase::loopBody(int) folly/io/async/EventBase.cpp:314
    #27 0x77b366 in folly::EventBase::loop() folly/io/async/EventBase.cpp:253
    #28 0x77fffd in folly::EventBase::loopForever() folly/io/async/EventBase.cpp:451
    #29 0x4e6ad4 in folly::run(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&) folly/io/async/ScopedEventBaseThread.cpp:40

Indirect leak of 832 byte(s) in 1 object(s) allocated from:
    #0 0xecf7f8 in malloc (/data/users/xbu/fbsource/fbcode/buck-out/dbg-asan/gen/wangle/acceptor/test/EvbHandshakeHelperTest+0xecf7f8)
    #1 0x7f4ab0e292e8 in CRYPTO_malloc /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/mem.c:346
    #2 0x7f4ab12a05b5 in SSL_CTX_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/ssl/ssl_lib.c:1988
    #3 0x6ebf18 in folly::SSLContext::SSLContext(folly::SSLContext::SSLVersion) folly/io/async/SSLContext.cpp:39
    #4 0x472c22 in void __gnu_cxx::new_allocator<folly::SSLContext>::construct<folly::SSLContext>(folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/ext/new_allocator.h:120
    #5 0x4727d7 in void std::allocator_traits<std::allocator<folly::SSLContext> >::construct<folly::SSLContext>(std::allocator<folly::SSLContext>&, folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/alloc_traits.h:517
    #6 0x4722cc in std::_Sp_counted_ptr_inplace<folly::SSLContext, std::allocator<folly::SSLContext>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<>(std::allocator<folly::SSLContext>) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:522
    #7 0x471db1 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<folly::SSLContext, std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, folly::SSLContext*, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:617
    #8 0x471b13 in std::__shared_ptr<folly::SSLContext, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:1096
    #9 0x471ab7 in std::shared_ptr<folly::SSLContext>::shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:319
    #10 0x471a3b in std::shared_ptr<folly::SSLContext> std::allocate_shared<folly::SSLContext, std::allocator<folly::SSLContext>>(std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:619
    #11 0x470d6a in std::shared_ptr<folly::SSLContext> std::make_shared<folly::SSLContext>() third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:635
    #12 0x47071d in EvbHandshakeHelperTest::SetUp()::{lambda()#1}::operator()() const wangle/acceptor/test/EvbHandshakeHelperTest.cpp:43
    #13 0x470454 in void folly::detail::function::FunctionTraits<void ()>::callSmall<EvbHandshakeHelperTest::SetUp()::{lambda()#1}>(folly::detail::function::Data&) folly/Function.h:314
    #14 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #15 0x785481 in folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3::operator()() folly/io/async/EventBase.cpp:581
    #16 0x78517f in void folly::detail::function::FunctionTraits<void ()>::callBig<folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3>(folly::detail::function::Data&) folly/Function.h:321
    #17 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #18 0x7a56bd in folly::EventBase::FunctionRunner::messageAvailable(folly::Function<void ()>&&) folly/io/async/EventBase.cpp:59
    #19 0x79628c in folly::NotificationQueue<folly::Function<void ()> >::Consumer::consumeMessages(bool, unsigned long*) folly/io/async/NotificationQueue.h:703
    #20 0x7a5701 in folly::NotificationQueue<folly::Function<void ()> >::Consumer::handlerReady(unsigned short) folly/io/async/NotificationQueue.h:640
    #21 0x7b0864 in folly::EventHandler::libeventCallback(int, short, void*) folly/io/async/EventHandler.cpp:160
    #22 0xfb0cb8 in event_process_active /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:390
    #23 0xfb0f7f in event_base_loop /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:532
    #24 0x77c545 in folly::EventBase::loopBody(int) folly/io/async/EventBase.cpp:314
    #25 0x77b366 in folly::EventBase::loop() folly/io/async/EventBase.cpp:253
    #26 0x77fffd in folly::EventBase::loopForever() folly/io/async/EventBase.cpp:451
    #27 0x4e6ad4 in folly::run(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&) folly/io/async/ScopedEventBaseThread.cpp:40
    #28 0x4ef13c in void std::_Bind_simple<void (*(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*>))(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&)>::_M_invoke<0ul, 1ul, 2ul, 3ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/functional:1530
    #29 0x4ef004 in std::_Bind_simple<void (*(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*>))(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&)>::operator()() third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/functional:1520

Indirect leak of 752 byte(s) in 1 object(s) allocated from:
    #0 0xecf7f8 in malloc (/data/users/xbu/fbsource/fbcode/buck-out/dbg-asan/gen/wangle/acceptor/test/EvbHandshakeHelperTest+0xecf7f8)
    #1 0x7f4ab0e292e8 in CRYPTO_malloc /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/mem.c:346
    #2 0x7f4ab12a377e in ssl_cert_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/ssl/ssl_cert.c:204
    #3 0x7f4ab12a06ac in SSL_CTX_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/ssl/ssl_lib.c:2037
    #4 0x6ebf18 in folly::SSLContext::SSLContext(folly::SSLContext::SSLVersion) folly/io/async/SSLContext.cpp:39
    #5 0x472c22 in void __gnu_cxx::new_allocator<folly::SSLContext>::construct<folly::SSLContext>(folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/ext/new_allocator.h:120
    #6 0x4727d7 in void std::allocator_traits<std::allocator<folly::SSLContext> >::construct<folly::SSLContext>(std::allocator<folly::SSLContext>&, folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/alloc_traits.h:517
    #7 0x4722cc in std::_Sp_counted_ptr_inplace<folly::SSLContext, std::allocator<folly::SSLContext>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<>(std::allocator<folly::SSLContext>) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:522
    #8 0x471db1 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<folly::SSLContext, std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, folly::SSLContext*, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:617
    #9 0x471b13 in std::__shared_ptr<folly::SSLContext, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:1096
    #10 0x471ab7 in std::shared_ptr<folly::SSLContext>::shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:319
    #11 0x471a3b in std::shared_ptr<folly::SSLContext> std::allocate_shared<folly::SSLContext, std::allocator<folly::SSLContext>>(std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:619
    #12 0x470d6a in std::shared_ptr<folly::SSLContext> std::make_shared<folly::SSLContext>() third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:635
    #13 0x47071d in EvbHandshakeHelperTest::SetUp()::{lambda()#1}::operator()() const wangle/acceptor/test/EvbHandshakeHelperTest.cpp:43
    #14 0x470454 in void folly::detail::function::FunctionTraits<void ()>::callSmall<EvbHandshakeHelperTest::SetUp()::{lambda()#1}>(folly::detail::function::Data&) folly/Function.h:314
    #15 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #16 0x785481 in folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3::operator()() folly/io/async/EventBase.cpp:581
    #17 0x78517f in void folly::detail::function::FunctionTraits<void ()>::callBig<folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3>(folly::detail::function::Data&) folly/Function.h:321
    #18 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #19 0x7a56bd in folly::EventBase::FunctionRunner::messageAvailable(folly::Function<void ()>&&) folly/io/async/EventBase.cpp:59
    #20 0x79628c in folly::NotificationQueue<folly::Function<void ()> >::Consumer::consumeMessages(bool, unsigned long*) folly/io/async/NotificationQueue.h:703
    #21 0x7a5701 in folly::NotificationQueue<folly::Function<void ()> >::Consumer::handlerReady(unsigned short) folly/io/async/NotificationQueue.h:640
    #22 0x7b0864 in folly::EventHandler::libeventCallback(int, short, void*) folly/io/async/EventHandler.cpp:160
    #23 0xfb0cb8 in event_process_active /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:390
    #24 0xfb0f7f in event_base_loop /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:532
    #25 0x77c545 in folly::EventBase::loopBody(int) folly/io/async/EventBase.cpp:314
    #26 0x77b366 in folly::EventBase::loop() folly/io/async/EventBase.cpp:253
    #27 0x77fffd in folly::EventBase::loopForever() folly/io/async/EventBase.cpp:451
    #28 0x4e6ad4 in folly::run(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&) folly/io/async/ScopedEventBaseThread.cpp:40
    #29 0x4ef13c in void std::_Bind_simple<void (*(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*>))(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&)>::_M_invoke<0ul, 1ul, 2ul, 3ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/functional:1530

Indirect leak of 280 byte(s) in 1 object(s) allocated from:
    #0 0xe08a18 in operator new(unsigned long) (/data/users/xbu/fbsource/fbcode/buck-out/dbg-asan/gen/wangle/acceptor/test/EvbHandshakeHelperTest+0xe08a18)
    #1 0x472618 in __gnu_cxx::new_allocator<std::_Sp_counted_ptr_inplace<folly::SSLContext, std::allocator<folly::SSLContext>, (__gnu_cxx::_Lock_policy)2> >::allocate(unsigned long, void const*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/ext/new_allocator.h:104
    #2 0x47252b in std::allocator_traits<std::allocator<std::_Sp_counted_ptr_inplace<folly::SSLContext, std::allocator<folly::SSLContext>, (__gnu_cxx::_Lock_policy)2> > >::allocate(std::allocator<std::_Sp_counted_ptr_inplace<folly::SSLContext, std::allocator<folly::SSLContext>, (__gnu_cxx::_Lock_policy)2> >&, unsigned long) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/alloc_traits.h:478
    #3 0x4720b4 in std::__allocated_ptr<std::allocator<std::_Sp_counted_ptr_inplace<folly::SSLContext, std::allocator<folly::SSLContext>, (__gnu_cxx::_Lock_policy)2> > > std::__allocate_guarded<std::allocator<std::_Sp_counted_ptr_inplace<folly::SSLContext, std::allocator<folly::SSLContext>, (__gnu_cxx::_Lock_policy)2> > >(std::allocator<std::_Sp_counted_ptr_inplace<folly::SSLContext, std::allocator<folly::SSLContext>, (__gnu_cxx::_Lock_policy)2> >&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/allocated_ptr.h:102
    #4 0x471d5c in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<folly::SSLContext, std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, folly::SSLContext*, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:615
    #5 0x471b13 in std::__shared_ptr<folly::SSLContext, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:1096
    #6 0x471ab7 in std::shared_ptr<folly::SSLContext>::shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:319
    #7 0x471a3b in std::shared_ptr<folly::SSLContext> std::allocate_shared<folly::SSLContext, std::allocator<folly::SSLContext>>(std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:619
    #8 0x470d6a in std::shared_ptr<folly::SSLContext> std::make_shared<folly::SSLContext>() third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:635
    #9 0x47071d in EvbHandshakeHelperTest::SetUp()::{lambda()#1}::operator()() const wangle/acceptor/test/EvbHandshakeHelperTest.cpp:43
    #10 0x470454 in void folly::detail::function::FunctionTraits<void ()>::callSmall<EvbHandshakeHelperTest::SetUp()::{lambda()#1}>(folly::detail::function::Data&) folly/Function.h:314
    #11 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #12 0x785481 in folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3::operator()() folly/io/async/EventBase.cpp:581
    #13 0x78517f in void folly::detail::function::FunctionTraits<void ()>::callBig<folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3>(folly::detail::function::Data&) folly/Function.h:321
    #14 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #15 0x7a56bd in folly::EventBase::FunctionRunner::messageAvailable(folly::Function<void ()>&&) folly/io/async/EventBase.cpp:59
    #16 0x79628c in folly::NotificationQueue<folly::Function<void ()> >::Consumer::consumeMessages(bool, unsigned long*) folly/io/async/NotificationQueue.h:703
    #17 0x7a5701 in folly::NotificationQueue<folly::Function<void ()> >::Consumer::handlerReady(unsigned short) folly/io/async/NotificationQueue.h:640
    #18 0x7b0864 in folly::EventHandler::libeventCallback(int, short, void*) folly/io/async/EventHandler.cpp:160
    #19 0xfb0cb8 in event_process_active /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:390
    #20 0xfb0f7f in event_base_loop /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:532
    #21 0x77c545 in folly::EventBase::loopBody(int) folly/io/async/EventBase.cpp:314
    #22 0x77b366 in folly::EventBase::loop() folly/io/async/EventBase.cpp:253
    #23 0x77fffd in folly::EventBase::loopForever() folly/io/async/EventBase.cpp:451
    #24 0x4e6ad4 in folly::run(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&) folly/io/async/ScopedEventBaseThread.cpp:40
    #25 0x4ef13c in void std::_Bind_simple<void (*(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*>))(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&)>::_M_invoke<0ul, 1ul, 2ul, 3ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/functional:1530
    #26 0x4ef004 in std::_Bind_simple<void (*(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*>))(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&)>::operator()() third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/functional:1520
    #27 0x4ee828 in std::thread::_Impl<std::_Bind_simple<void (*(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*>))(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&)> >::_M_run() third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/thread:115
    #28 0x7f4ab08d9170 in execute_native_thread_routine /home/engshare/third-party2/libgcc/5.x/src/gcc-5/x86_64-facebook-linux/libstdc++-v3/src/c++11/../../../.././libstdc++-v3/src/c++11/thread.cc:84
    #29 0x7f4aafdba7a8 in start_thread /home/engshare/third-party2/glibc/2.23/src/glibc-2.23/nptl/pthread_create.c:333

Indirect leak of 176 byte(s) in 1 object(s) allocated from:
    #0 0xecf7f8 in malloc (/data/users/xbu/fbsource/fbcode/buck-out/dbg-asan/gen/wangle/acceptor/test/EvbHandshakeHelperTest+0xecf7f8)
    #1 0x7f4ab0e292e8 in CRYPTO_malloc /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/mem.c:346
    #2 0x7f4ab0efc668 in lh_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/lhash/lhash.c:138
    #3 0x7f4ab12a0706 in SSL_CTX_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/ssl/ssl_lib.c:2046
    #4 0x6ebf18 in folly::SSLContext::SSLContext(folly::SSLContext::SSLVersion) folly/io/async/SSLContext.cpp:39
    #5 0x472c22 in void __gnu_cxx::new_allocator<folly::SSLContext>::construct<folly::SSLContext>(folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/ext/new_allocator.h:120
    #6 0x4727d7 in void std::allocator_traits<std::allocator<folly::SSLContext> >::construct<folly::SSLContext>(std::allocator<folly::SSLContext>&, folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/alloc_traits.h:517
    #7 0x4722cc in std::_Sp_counted_ptr_inplace<folly::SSLContext, std::allocator<folly::SSLContext>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<>(std::allocator<folly::SSLContext>) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:522
    #8 0x471db1 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<folly::SSLContext, std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, folly::SSLContext*, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:617
    #9 0x471b13 in std::__shared_ptr<folly::SSLContext, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:1096
    #10 0x471ab7 in std::shared_ptr<folly::SSLContext>::shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:319
    #11 0x471a3b in std::shared_ptr<folly::SSLContext> std::allocate_shared<folly::SSLContext, std::allocator<folly::SSLContext>>(std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:619
    #12 0x470d6a in std::shared_ptr<folly::SSLContext> std::make_shared<folly::SSLContext>() third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:635
    #13 0x47071d in EvbHandshakeHelperTest::SetUp()::{lambda()#1}::operator()() const wangle/acceptor/test/EvbHandshakeHelperTest.cpp:43
    #14 0x470454 in void folly::detail::function::FunctionTraits<void ()>::callSmall<EvbHandshakeHelperTest::SetUp()::{lambda()#1}>(folly::detail::function::Data&) folly/Function.h:314
    #15 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #16 0x785481 in folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3::operator()() folly/io/async/EventBase.cpp:581
    #17 0x78517f in void folly::detail::function::FunctionTraits<void ()>::callBig<folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3>(folly::detail::function::Data&) folly/Function.h:321
    #18 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #19 0x7a56bd in folly::EventBase::FunctionRunner::messageAvailable(folly::Function<void ()>&&) folly/io/async/EventBase.cpp:59
    #20 0x79628c in folly::NotificationQueue<folly::Function<void ()> >::Consumer::consumeMessages(bool, unsigned long*) folly/io/async/NotificationQueue.h:703
    #21 0x7a5701 in folly::NotificationQueue<folly::Function<void ()> >::Consumer::handlerReady(unsigned short) folly/io/async/NotificationQueue.h:640
    #22 0x7b0864 in folly::EventHandler::libeventCallback(int, short, void*) folly/io/async/EventHandler.cpp:160
    #23 0xfb0cb8 in event_process_active /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:390
    #24 0xfb0f7f in event_base_loop /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:532
    #25 0x77c545 in folly::EventBase::loopBody(int) folly/io/async/EventBase.cpp:314
    #26 0x77b366 in folly::EventBase::loop() folly/io/async/EventBase.cpp:253
    #27 0x77fffd in folly::EventBase::loopForever() folly/io/async/EventBase.cpp:451
    #28 0x4e6ad4 in folly::run(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&) folly/io/async/ScopedEventBaseThread.cpp:40
    #29 0x4ef13c in void std::_Bind_simple<void (*(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*>))(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&)>::_M_invoke<0ul, 1ul, 2ul, 3ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/functional:1530

Indirect leak of 144 byte(s) in 1 object(s) allocated from:
    #0 0xecf7f8 in malloc (/data/users/xbu/fbsource/fbcode/buck-out/dbg-asan/gen/wangle/acceptor/test/EvbHandshakeHelperTest+0xecf7f8)
    #1 0x7f4ab0e292e8 in CRYPTO_malloc /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/mem.c:346
    #2 0x7f4ab0f59a3e in X509_STORE_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/x509/x509_lu.c:186
    #3 0x7f4ab12a0718 in SSL_CTX_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/ssl/ssl_lib.c:2049
    #4 0x6ebf18 in folly::SSLContext::SSLContext(folly::SSLContext::SSLVersion) folly/io/async/SSLContext.cpp:39
    #5 0x472c22 in void __gnu_cxx::new_allocator<folly::SSLContext>::construct<folly::SSLContext>(folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/ext/new_allocator.h:120
    #6 0x4727d7 in void std::allocator_traits<std::allocator<folly::SSLContext> >::construct<folly::SSLContext>(std::allocator<folly::SSLContext>&, folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/alloc_traits.h:517
    #7 0x4722cc in std::_Sp_counted_ptr_inplace<folly::SSLContext, std::allocator<folly::SSLContext>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<>(std::allocator<folly::SSLContext>) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:522
    #8 0x471db1 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<folly::SSLContext, std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, folly::SSLContext*, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:617
    #9 0x471b13 in std::__shared_ptr<folly::SSLContext, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:1096
    #10 0x471ab7 in std::shared_ptr<folly::SSLContext>::shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:319
    #11 0x471a3b in std::shared_ptr<folly::SSLContext> std::allocate_shared<folly::SSLContext, std::allocator<folly::SSLContext>>(std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:619
    #12 0x470d6a in std::shared_ptr<folly::SSLContext> std::make_shared<folly::SSLContext>() third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:635
    #13 0x47071d in EvbHandshakeHelperTest::SetUp()::{lambda()#1}::operator()() const wangle/acceptor/test/EvbHandshakeHelperTest.cpp:43
    #14 0x470454 in void folly::detail::function::FunctionTraits<void ()>::callSmall<EvbHandshakeHelperTest::SetUp()::{lambda()#1}>(folly::detail::function::Data&) folly/Function.h:314
    #15 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #16 0x785481 in folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3::operator()() folly/io/async/EventBase.cpp:581
    #17 0x78517f in void folly::detail::function::FunctionTraits<void ()>::callBig<folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3>(folly::detail::function::Data&) folly/Function.h:321
    #18 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #19 0x7a56bd in folly::EventBase::FunctionRunner::messageAvailable(folly::Function<void ()>&&) folly/io/async/EventBase.cpp:59
    #20 0x79628c in folly::NotificationQueue<folly::Function<void ()> >::Consumer::consumeMessages(bool, unsigned long*) folly/io/async/NotificationQueue.h:703
    #21 0x7a5701 in folly::NotificationQueue<folly::Function<void ()> >::Consumer::handlerReady(unsigned short) folly/io/async/NotificationQueue.h:640
    #22 0x7b0864 in folly::EventHandler::libeventCallback(int, short, void*) folly/io/async/EventHandler.cpp:160
    #23 0xfb0cb8 in event_process_active /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:390
    #24 0xfb0f7f in event_base_loop /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:532
    #25 0x77c545 in folly::EventBase::loopBody(int) folly/io/async/EventBase.cpp:314
    #26 0x77b366 in folly::EventBase::loop() folly/io/async/EventBase.cpp:253
    #27 0x77fffd in folly::EventBase::loopForever() folly/io/async/EventBase.cpp:451
    #28 0x4e6ad4 in folly::run(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&) folly/io/async/ScopedEventBaseThread.cpp:40
    #29 0x4ef13c in void std::_Bind_simple<void (*(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*>))(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&)>::_M_invoke<0ul, 1ul, 2ul, 3ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/functional:1530

Indirect leak of 128 byte(s) in 1 object(s) allocated from:
    #0 0xecf7f8 in malloc (/data/users/xbu/fbsource/fbcode/buck-out/dbg-asan/gen/wangle/acceptor/test/EvbHandshakeHelperTest+0xecf7f8)
    #1 0x7f4ab0e292e8 in CRYPTO_malloc /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/mem.c:346
    #2 0x7f4ab0efc68a in lh_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/lhash/lhash.c:140
    #3 0x7f4ab12a0706 in SSL_CTX_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/ssl/ssl_lib.c:2046
    #4 0x6ebf18 in folly::SSLContext::SSLContext(folly::SSLContext::SSLVersion) folly/io/async/SSLContext.cpp:39
    #5 0x472c22 in void __gnu_cxx::new_allocator<folly::SSLContext>::construct<folly::SSLContext>(folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/ext/new_allocator.h:120
    #6 0x4727d7 in void std::allocator_traits<std::allocator<folly::SSLContext> >::construct<folly::SSLContext>(std::allocator<folly::SSLContext>&, folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/alloc_traits.h:517
    #7 0x4722cc in std::_Sp_counted_ptr_inplace<folly::SSLContext, std::allocator<folly::SSLContext>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<>(std::allocator<folly::SSLContext>) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:522
    #8 0x471db1 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<folly::SSLContext, std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, folly::SSLContext*, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:617
    #9 0x471b13 in std::__shared_ptr<folly::SSLContext, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:1096
    #10 0x471ab7 in std::shared_ptr<folly::SSLContext>::shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:319
    #11 0x471a3b in std::shared_ptr<folly::SSLContext> std::allocate_shared<folly::SSLContext, std::allocator<folly::SSLContext>>(std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:619
    #12 0x470d6a in std::shared_ptr<folly::SSLContext> std::make_shared<folly::SSLContext>() third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:635
    #13 0x47071d in EvbHandshakeHelperTest::SetUp()::{lambda()#1}::operator()() const wangle/acceptor/test/EvbHandshakeHelperTest.cpp:43
    #14 0x470454 in void folly::detail::function::FunctionTraits<void ()>::callSmall<EvbHandshakeHelperTest::SetUp()::{lambda()#1}>(folly::detail::function::Data&) folly/Function.h:314
    #15 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #16 0x785481 in folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3::operator()() folly/io/async/EventBase.cpp:581
    #17 0x78517f in void folly::detail::function::FunctionTraits<void ()>::callBig<folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3>(folly::detail::function::Data&) folly/Function.h:321
    #18 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #19 0x7a56bd in folly::EventBase::FunctionRunner::messageAvailable(folly::Function<void ()>&&) folly/io/async/EventBase.cpp:59
    #20 0x79628c in folly::NotificationQueue<folly::Function<void ()> >::Consumer::consumeMessages(bool, unsigned long*) folly/io/async/NotificationQueue.h:703
    #21 0x7a5701 in folly::NotificationQueue<folly::Function<void ()> >::Consumer::handlerReady(unsigned short) folly/io/async/NotificationQueue.h:640
    #22 0x7b0864 in folly::EventHandler::libeventCallback(int, short, void*) folly/io/async/EventHandler.cpp:160
    #23 0xfb0cb8 in event_process_active /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:390
    #24 0xfb0f7f in event_base_loop /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:532
    #25 0x77c545 in folly::EventBase::loopBody(int) folly/io/async/EventBase.cpp:314
    #26 0x77b366 in folly::EventBase::loop() folly/io/async/EventBase.cpp:253
    #27 0x77fffd in folly::EventBase::loopForever() folly/io/async/EventBase.cpp:451
    #28 0x4e6ad4 in folly::run(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&) folly/io/async/ScopedEventBaseThread.cpp:40
    #29 0x4ef13c in void std::_Bind_simple<void (*(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*>))(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&)>::_M_invoke<0ul, 1ul, 2ul, 3ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/functional:1530

Indirect leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0xecf7f8 in malloc (/data/users/xbu/fbsource/fbcode/buck-out/dbg-asan/gen/wangle/acceptor/test/EvbHandshakeHelperTest+0xecf7f8)
    #1 0x7f4ab0e292e8 in CRYPTO_malloc /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/mem.c:346
    #2 0x7f4ab0f5d2e2 in X509_VERIFY_PARAM_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/x509/x509_vpm.c:176
    #3 0x7f4ab12a0772 in SSL_CTX_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/ssl/ssl_lib.c:2063
    #4 0x6ebf18 in folly::SSLContext::SSLContext(folly::SSLContext::SSLVersion) folly/io/async/SSLContext.cpp:39
    #5 0x472c22 in void __gnu_cxx::new_allocator<folly::SSLContext>::construct<folly::SSLContext>(folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/ext/new_allocator.h:120
    #6 0x4727d7 in void std::allocator_traits<std::allocator<folly::SSLContext> >::construct<folly::SSLContext>(std::allocator<folly::SSLContext>&, folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/alloc_traits.h:517
    #7 0x4722cc in std::_Sp_counted_ptr_inplace<folly::SSLContext, std::allocator<folly::SSLContext>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<>(std::allocator<folly::SSLContext>) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:522
    #8 0x471db1 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<folly::SSLContext, std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, folly::SSLContext*, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:617
    #9 0x471b13 in std::__shared_ptr<folly::SSLContext, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:1096
    #10 0x471ab7 in std::shared_ptr<folly::SSLContext>::shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:319
    #11 0x471a3b in std::shared_ptr<folly::SSLContext> std::allocate_shared<folly::SSLContext, std::allocator<folly::SSLContext>>(std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:619
    #12 0x470d6a in std::shared_ptr<folly::SSLContext> std::make_shared<folly::SSLContext>() third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:635
    #13 0x47071d in EvbHandshakeHelperTest::SetUp()::{lambda()#1}::operator()() const wangle/acceptor/test/EvbHandshakeHelperTest.cpp:43
    #14 0x470454 in void folly::detail::function::FunctionTraits<void ()>::callSmall<EvbHandshakeHelperTest::SetUp()::{lambda()#1}>(folly::detail::function::Data&) folly/Function.h:314
    #15 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #16 0x785481 in folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3::operator()() folly/io/async/EventBase.cpp:581
    #17 0x78517f in void folly::detail::function::FunctionTraits<void ()>::callBig<folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3>(folly::detail::function::Data&) folly/Function.h:321
    #18 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #19 0x7a56bd in folly::EventBase::FunctionRunner::messageAvailable(folly::Function<void ()>&&) folly/io/async/EventBase.cpp:59
    #20 0x79628c in folly::NotificationQueue<folly::Function<void ()> >::Consumer::consumeMessages(bool, unsigned long*) folly/io/async/NotificationQueue.h:703
    #21 0x7a5701 in folly::NotificationQueue<folly::Function<void ()> >::Consumer::handlerReady(unsigned short) folly/io/async/NotificationQueue.h:640
    #22 0x7b0864 in folly::EventHandler::libeventCallback(int, short, void*) folly/io/async/EventHandler.cpp:160
    #23 0xfb0cb8 in event_process_active /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:390
    #24 0xfb0f7f in event_base_loop /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:532
    #25 0x77c545 in folly::EventBase::loopBody(int) folly/io/async/EventBase.cpp:314
    #26 0x77b366 in folly::EventBase::loop() folly/io/async/EventBase.cpp:253
    #27 0x77fffd in folly::EventBase::loopForever() folly/io/async/EventBase.cpp:451
    #28 0x4e6ad4 in folly::run(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&) folly/io/async/ScopedEventBaseThread.cpp:40
    #29 0x4ef13c in void std::_Bind_simple<void (*(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*>))(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&)>::_M_invoke<0ul, 1ul, 2ul, 3ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/functional:1530

Indirect leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0xecf7f8 in malloc (/data/users/xbu/fbsource/fbcode/buck-out/dbg-asan/gen/wangle/acceptor/test/EvbHandshakeHelperTest+0xecf7f8)
    #1 0x7f4ab0e292e8 in CRYPTO_malloc /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/mem.c:346
    #2 0x7f4ab0f5d2e2 in X509_VERIFY_PARAM_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/x509/x509_vpm.c:176
    #3 0x7f4ab0f59a90 in X509_STORE_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/x509/x509_lu.c:196
    #4 0x7f4ab12a0718 in SSL_CTX_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/ssl/ssl_lib.c:2049
    #5 0x6ebf18 in folly::SSLContext::SSLContext(folly::SSLContext::SSLVersion) folly/io/async/SSLContext.cpp:39
    #6 0x472c22 in void __gnu_cxx::new_allocator<folly::SSLContext>::construct<folly::SSLContext>(folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/ext/new_allocator.h:120
    #7 0x4727d7 in void std::allocator_traits<std::allocator<folly::SSLContext> >::construct<folly::SSLContext>(std::allocator<folly::SSLContext>&, folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/alloc_traits.h:517
    #8 0x4722cc in std::_Sp_counted_ptr_inplace<folly::SSLContext, std::allocator<folly::SSLContext>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<>(std::allocator<folly::SSLContext>) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:522
    #9 0x471db1 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<folly::SSLContext, std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, folly::SSLContext*, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:617
    #10 0x471b13 in std::__shared_ptr<folly::SSLContext, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:1096
    #11 0x471ab7 in std::shared_ptr<folly::SSLContext>::shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:319
    #12 0x471a3b in std::shared_ptr<folly::SSLContext> std::allocate_shared<folly::SSLContext, std::allocator<folly::SSLContext>>(std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:619
    #13 0x470d6a in std::shared_ptr<folly::SSLContext> std::make_shared<folly::SSLContext>() third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:635
    #14 0x47071d in EvbHandshakeHelperTest::SetUp()::{lambda()#1}::operator()() const wangle/acceptor/test/EvbHandshakeHelperTest.cpp:43
    #15 0x470454 in void folly::detail::function::FunctionTraits<void ()>::callSmall<EvbHandshakeHelperTest::SetUp()::{lambda()#1}>(folly::detail::function::Data&) folly/Function.h:314
    #16 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #17 0x785481 in folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3::operator()() folly/io/async/EventBase.cpp:581
    #18 0x78517f in void folly::detail::function::FunctionTraits<void ()>::callBig<folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3>(folly::detail::function::Data&) folly/Function.h:321
    #19 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #20 0x7a56bd in folly::EventBase::FunctionRunner::messageAvailable(folly::Function<void ()>&&) folly/io/async/EventBase.cpp:59
    #21 0x79628c in folly::NotificationQueue<folly::Function<void ()> >::Consumer::consumeMessages(bool, unsigned long*) folly/io/async/NotificationQueue.h:703
    #22 0x7a5701 in folly::NotificationQueue<folly::Function<void ()> >::Consumer::handlerReady(unsigned short) folly/io/async/NotificationQueue.h:640
    #23 0x7b0864 in folly::EventHandler::libeventCallback(int, short, void*) folly/io/async/EventHandler.cpp:160
    #24 0xfb0cb8 in event_process_active /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:390
    #25 0xfb0f7f in event_base_loop /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:532
    #26 0x77c545 in folly::EventBase::loopBody(int) folly/io/async/EventBase.cpp:314
    #27 0x77b366 in folly::EventBase::loop() folly/io/async/EventBase.cpp:253
    #28 0x77fffd in folly::EventBase::loopForever() folly/io/async/EventBase.cpp:451
    #29 0x4e6ad4 in folly::run(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&) folly/io/async/ScopedEventBaseThread.cpp:40

Indirect leak of 56 byte(s) in 1 object(s) allocated from:
    #0 0xecf7f8 in malloc (/data/users/xbu/fbsource/fbcode/buck-out/dbg-asan/gen/wangle/acceptor/test/EvbHandshakeHelperTest+0xecf7f8)
    #1 0x7f4ab0e292e8 in CRYPTO_malloc /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/mem.c:346
    #2 0x7f4ab0f5d315 in X509_VERIFY_PARAM_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/x509/x509_vpm.c:181
    #3 0x7f4ab12a0772 in SSL_CTX_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/ssl/ssl_lib.c:2063
    #4 0x6ebf18 in folly::SSLContext::SSLContext(folly::SSLContext::SSLVersion) folly/io/async/SSLContext.cpp:39
    #5 0x472c22 in void __gnu_cxx::new_allocator<folly::SSLContext>::construct<folly::SSLContext>(folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/ext/new_allocator.h:120
    #6 0x4727d7 in void std::allocator_traits<std::allocator<folly::SSLContext> >::construct<folly::SSLContext>(std::allocator<folly::SSLContext>&, folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/alloc_traits.h:517
    #7 0x4722cc in std::_Sp_counted_ptr_inplace<folly::SSLContext, std::allocator<folly::SSLContext>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<>(std::allocator<folly::SSLContext>) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:522
    #8 0x471db1 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<folly::SSLContext, std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, folly::SSLContext*, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:617
    #9 0x471b13 in std::__shared_ptr<folly::SSLContext, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr_base.h:1096
    #10 0x471ab7 in std::shared_ptr<folly::SSLContext>::shared_ptr<std::allocator<folly::SSLContext>>(std::_Sp_make_shared_tag, std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:319
    #11 0x471a3b in std::shared_ptr<folly::SSLContext> std::allocate_shared<folly::SSLContext, std::allocator<folly::SSLContext>>(std::allocator<folly::SSLContext> const&) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:619
    #12 0x470d6a in std::shared_ptr<folly::SSLContext> std::make_shared<folly::SSLContext>() third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/bits/shared_ptr.h:635
    #13 0x47071d in EvbHandshakeHelperTest::SetUp()::{lambda()#1}::operator()() const wangle/acceptor/test/EvbHandshakeHelperTest.cpp:43
    #14 0x470454 in void folly::detail::function::FunctionTraits<void ()>::callSmall<EvbHandshakeHelperTest::SetUp()::{lambda()#1}>(folly::detail::function::Data&) folly/Function.h:314
    #15 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #16 0x785481 in folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3::operator()() folly/io/async/EventBase.cpp:581
    #17 0x78517f in void folly::detail::function::FunctionTraits<void ()>::callBig<folly::EventBase::runInEventBaseThreadAndWait(folly::Function<void ()>)::$_3>(folly::detail::function::Data&) folly/Function.h:321
    #18 0x4e91f9 in folly::detail::function::FunctionTraits<void ()>::operator()() folly/Function.h:330
    #19 0x7a56bd in folly::EventBase::FunctionRunner::messageAvailable(folly::Function<void ()>&&) folly/io/async/EventBase.cpp:59
    #20 0x79628c in folly::NotificationQueue<folly::Function<void ()> >::Consumer::consumeMessages(bool, unsigned long*) folly/io/async/NotificationQueue.h:703
    #21 0x7a5701 in folly::NotificationQueue<folly::Function<void ()> >::Consumer::handlerReady(unsigned short) folly/io/async/NotificationQueue.h:640
    #22 0x7b0864 in folly::EventHandler::libeventCallback(int, short, void*) folly/io/async/EventHandler.cpp:160
    #23 0xfb0cb8 in event_process_active /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:390
    #24 0xfb0f7f in event_base_loop /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/event.c:532
    #25 0x77c545 in folly::EventBase::loopBody(int) folly/io/async/EventBase.cpp:314
    #26 0x77b366 in folly::EventBase::loop() folly/io/async/EventBase.cpp:253
    #27 0x77fffd in folly::EventBase::loopForever() folly/io/async/EventBase.cpp:451
    #28 0x4e6ad4 in folly::run(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&) folly/io/async/ScopedEventBaseThread.cpp:40
    #29 0x4ef13c in void std::_Bind_simple<void (*(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*>))(folly::EventBaseManager*, folly::EventBase*, folly::Baton<std::atomic, true>*, folly::Range<char const*> const&)>::_M_invoke<0ul, 1ul, 2ul, 3ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/functional:1530

Indirect leak of 56 byte(s) in 1 object(s) allocated from:
    #0 0xecf7f8 in malloc (/data/users/xbu/fbsource/fbcode/buck-out/dbg-asan/gen/wangle/acceptor/test/EvbHandshakeHelperTest+0xecf7f8)
    #1 0x7f4ab0e292e8 in CRYPTO_malloc /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/mem.c:346
    #2 0x7f4ab0f5d315 in X509_VERIFY_PARAM_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/x509/x509_vpm.c:181
    #3 0x7f4ab0f59a90 in X509_STORE_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/crypto/x509/x509_lu.c:196
    #4 0x7f4ab12a0718 in SSL_CTX_new /home/engshare/third-party2/openssl/1.0.2/src/openssl-1.0.2/ssl/ssl_lib.c:2049
    #5 0x6ebf18 in folly::SSLContext::SSLContext(folly::SSLContext::SSLVersion) folly/io/async/SSLContext.cpp:39
    #6 0x472c22 in void __gnu_cxx::new_allocator<folly::SSLContext>::construct<folly::SSLContext>(folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c++/trunk/ext/new_allocator.h:120
    #7 0x4727d7 in void std::allocator_traits<std::allocator<folly::SSLContext> >::construct<folly::SSLContext>(std::allocator<folly::SSLContext>&, folly::SSLContext*) third-party-buck/gcc-5-glibc-2.23/build/libgcc/include/c+(Truncated to 64511B by TestPilot; full output here: everstore://GPc2hQG7w0VgXwsHAAAAAADBLqhJbswMAAAz:Full_Test_Output:)
Finished test run: https://our.intern.facebook.com/intern/testinfra/testrun…
facebook-github-bot pushed a commit that referenced this issue Dec 3, 2021
…ations

Summary:
Acceptor keeps track of the number of outstanding pending handshakes through
`numPendingSSLConns_`. This counter is incremented right before an
AcceptorHandshakeManager is allocated, and it is decremented when the
handshake manager invokes `sslConnectionReady` or `sslConnectionError`.

Prior to this diff, the timeout path relied on an implementation detail of the
underlying helper to properly decrement this counter. The implementation
assumed that a timeout occurred, calling `helper_->dropConnection()` would
synchronously cause `connectionError()` to be raised, which would be forwarded
to the acceptor.

For example, if a client only sent a ClientHello and stopped future data,
the timeout stack would look something like:

```
#4 0x7f5db75591d7 in wangle::AcceptorHandshakeManager::connectionError(folly::AsyncTransport*, folly::exception_wrapper, folly::Optional<wangle::SSLErrorEnum>) wangle/acceptor/AcceptorHandshakeManager.cpp:84
 #5 0x7f5db7560f92 in wangle::FizzAcceptorHandshakeHelper::fizzHandshakeError(fizz::server::AsyncFizzServerT<fizz::server::ServerStateMachine>*, folly::exception_wrapper) wangle/acceptor/FizzAcceptorHandshakeHelper.cpp:137
 #6 0x7f5db7582a3b in fizz::server::AsyncFizzServerT<fizz::server::ServerStateMachine>::deliverHandshakeError(folly::exception_wrapper) ./buck-out/dev/gen/aab7ed39/fizz/server/async_fizz_server#header-mode-symlink-tree-with-header-map,headers/fizz/server/AsyncFizzServer-inl.h:239
 #7 0x7f5db7582be0 in fizz::server::AsyncFizzServerT<fizz::server::ServerStateMachine>::deliverAllErrors(folly::AsyncSocketException const&, bool) ./buck-out/dev/gen/aab7ed39/fizz/server/async_fizz_server#header-mode-symlink-tree-with-header-map,headers/fizz/server/AsyncFizzServer-inl.h:229
 #8 0x7f5db7576a05 in fizz::server::AsyncFizzServerT<fizz::server::ServerStateMachine>::closeNow() ./buck-out/dev/gen/aab7ed39/fizz/server/async_fizz_server#header-mode-symlink-tree-with-header-map,headers/fizz/server/AsyncFizzServer-inl.h:139
 #9 0x7f5dc7958576 in wangle::FizzAcceptorHandshakeHelper::dropConnection(wangle::SSLErrorEnum) ./buck-out/dev/gen/aab7ed39/wangle/acceptor/acceptor#header-mode-symlink-tree-with-header-map,headers/wangle/acceptor/FizzAcceptorHandshakeHelper.h:191
 #10 0x7f5db75357b3 in wangle::PeekingAcceptorHandshakeHelper::dropConnection(wangle::SSLErrorEnum) buck-out/dev/gen/aab7ed39/wangle/acceptor/acceptor#header-mode-symlink-tree-with-header-map,headers/wangle/acceptor/PeekingAcceptorHandshakeHelper.h:86
 #11 0x7f5db7559732 in wangle::AcceptorHandshakeManager::timeoutExpired() wangle/acceptor/AcceptorHandshakeManager.cpp:99
```

This only happens because `dropConnection()` would close the underlying socket,
which shows up as an I/O error on the handshaker (both for Fizz and for
OpenSSL).

This is the case for all existing implementations of handshake helpers.

This diff documents this behavior as required for handshake helper
implementations and adds a few debugging checks for verifying this property.

Reviewed By: knekritz

Differential Revision: D32302133

fbshipit-source-id: e0d9007954242a724dc7cb2b2d5073cac307bf4e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants