Note: Google Test filter = CastStreamingSessionUafTest.* [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from CastStreamingSessionUafTest [ RUN ] CastStreamingSessionUafTest.DeferredStartSessionUsesFreedReceiver [2863:2863:ERROR:third_party/openscreen/src/cast/streaming/public/environment.cc:29] Unable to create a UDP socket bound to 0.0.0.0:0: Failure: InitializationFailure = "" [2863:2863:ERROR:third_party/openscreen/src/cast/streaming/public/environment.cc:29] Unable to create a UDP socket bound to 0.0.0.0:0: Failure: InitializationFailure = "" ================================================================= ==2863==ERROR: AddressSanitizer: heap-use-after-free on address 0x7db1e2bef200 at pc 0x564aac89fc38 bp 0x7ffe20ae4010 sp 0x7ffe20ae4008 READ of size 8 at 0x7db1e2bef200 thread T0 #0 0x564aac89fc37 in cast_streaming::StreamConsumer::StreamConsumer(openscreen::cast::Receiver*, mojo::ScopedHandleBase, base::RepeatingCallback)>, base::RepeatingCallback, std::__Cr::unique_ptr>) components/cast_streaming/browser/frame/stream_consumer.cc:39:14 #1 0x564aa8b68ead in cast_streaming::CastStreamingSession::ReceiverSessionClient::InitializeAudioConsumer(cast_streaming::StreamingInitializationInfo const&) gen/third_party/libc++/src/include/__memory/unique_ptr.h:756:30 #2 0x564aa8b6a0d2 in cast_streaming::CastStreamingSession::ReceiverSessionClient::StartStreamingSession(cast_streaming::StreamingInitializationInfo) components/cast_streaming/browser/cast_streaming_session.cc:348:34 #3 0x564aa8b6ffca in void base::internal::Invoker&&, cast_streaming::StreamingInitializationInfo&&>, base::internal::BindState, cast_streaming::StreamingInitializationInfo>, void ()>::RunImpl, cast_streaming::StreamingInitializationInfo>, 0ul, 1ul>(void (cast_streaming::CastStreamingSession::ReceiverSessionClient::*&&)(cast_streaming::StreamingInitializationInfo), std::__Cr::tuple, cast_streaming::StreamingInitializationInfo>&&, std::__Cr::integer_sequence) base/functional/bind_internal.h:740:12 #4 0x564aa8b6c61d in cast_streaming::CastStreamingSession::ReceiverSessionClient::OnFlushComplete() base/functional/callback.h:155:12 #5 0x564aa8b600d0 in cast_streaming::CastStreamingSessionUafTest::RunRepro() components/cast_streaming/browser/cast_streaming_session_uaf_unittest.cc:242:8 #6 0x564aad34126b in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc #7 0x564aad343467 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2892:11 #8 0x564aad345573 in testing::TestSuite::Run() third_party/googletest/src/googletest/src/gtest.cc:3070:30 #9 0x564aad3753ca in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:6062:44 #10 0x564aad373e2e in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc #11 0x564ab25006fc in base::TestSuite::Run() base/test/test_suite.cc:440:16 #12 0x564aa8b47a11 in base::internal::Invoker, base::internal::BindState>, int ()>::RunOnce(base::internal::BindStateBase*) base/functional/bind_internal.h:740:12 #13 0x564ab250dabb in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback, unsigned long, int, unsigned long, bool, base::RepeatingCallback, base::OnceCallback) base/functional/callback.h:155:12 #14 0x564ab250d3db in base::LaunchUnitTests(int, char**, base::OnceCallback, unsigned long) base/test/launcher/unit_test_launcher.cc:337:10 #15 0x564aa8b476f5 in main media/test/run_all_unittests.cc:52:10 #16 0x7f21e45c1249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 6196744a316dbd57c0fd8968df1680aac482cec4) 0x7db1e2bef200 is located 0 bytes inside of 18304-byte region [0x7db1e2bef200,0x7db1e2bf3980) freed by thread T0 here: #0 0x564aa8b46c42 in operator delete(void*, unsigned long) (/chromium/chromium/src/out/asan/cast_streaming_unittests+0x44cbc42) (BuildId: 84c7d8b94ab0fcf7) #1 0x564aa8b5fe89 in cast_streaming::CastStreamingSessionUafTest::RunRepro() gen/third_party/libc++/src/include/__memory/unique_ptr.h:74:5 #2 0x564aad34126b in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc #3 0x564aad343467 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2892:11 #4 0x564aad345573 in testing::TestSuite::Run() third_party/googletest/src/googletest/src/gtest.cc:3070:30 #5 0x564aad3753ca in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:6062:44 #6 0x564aad373e2e in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc #7 0x564ab25006fc in base::TestSuite::Run() base/test/test_suite.cc:440:16 #8 0x564aa8b47a11 in base::internal::Invoker, base::internal::BindState>, int ()>::RunOnce(base::internal::BindStateBase*) base/functional/bind_internal.h:740:12 #9 0x564ab250dabb in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback, unsigned long, int, unsigned long, bool, base::RepeatingCallback, base::OnceCallback) base/functional/callback.h:155:12 #10 0x564ab250d3db in base::LaunchUnitTests(int, char**, base::OnceCallback, unsigned long) base/test/launcher/unit_test_launcher.cc:337:10 #11 0x564aa8b476f5 in main media/test/run_all_unittests.cc:52:10 #12 0x7f21e45c1249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 6196744a316dbd57c0fd8968df1680aac482cec4) previously allocated by thread T0 here: #0 0x564aa8b4603d in operator new(unsigned long) (/chromium/chromium/src/out/asan/cast_streaming_unittests+0x44cb03d) (BuildId: 84c7d8b94ab0fcf7) #1 0x564aa8b5fa83 in cast_streaming::CastStreamingSessionUafTest::RunRepro() gen/third_party/libc++/src/include/__memory/unique_ptr.h:756:26 #2 0x564aad34126b in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc #3 0x564aad343467 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2892:11 #4 0x564aad345573 in testing::TestSuite::Run() third_party/googletest/src/googletest/src/gtest.cc:3070:30 #5 0x564aad3753ca in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:6062:44 #6 0x564aad373e2e in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc #7 0x564ab25006fc in base::TestSuite::Run() base/test/test_suite.cc:440:16 #8 0x564aa8b47a11 in base::internal::Invoker, base::internal::BindState>, int ()>::RunOnce(base::internal::BindStateBase*) base/functional/bind_internal.h:740:12 #9 0x564ab250dabb in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback, unsigned long, int, unsigned long, bool, base::RepeatingCallback, base::OnceCallback) base/functional/callback.h:155:12 #10 0x564ab250d3db in base::LaunchUnitTests(int, char**, base::OnceCallback, unsigned long) base/test/launcher/unit_test_launcher.cc:337:10 #11 0x564aa8b476f5 in main media/test/run_all_unittests.cc:52:10 #12 0x7f21e45c1249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 6196744a316dbd57c0fd8968df1680aac482cec4) SUMMARY: AddressSanitizer: heap-use-after-free components/cast_streaming/browser/frame/stream_consumer.cc:39:14 in cast_streaming::StreamConsumer::StreamConsumer(openscreen::cast::Receiver*, mojo::ScopedHandleBase, base::RepeatingCallback)>, base::RepeatingCallback, std::__Cr::unique_ptr>) Shadow bytes around the buggy address: 0x7db1e2beef80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x7db1e2bef000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x7db1e2bef080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x7db1e2bef100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x7db1e2bef180: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x7db1e2bef200:[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7db1e2bef280: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7db1e2bef300: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7db1e2bef380: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7db1e2bef400: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7db1e2bef480: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 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 Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 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 ==2863==ADDITIONAL INFO ==2863==Note: Please include this section with the ASan report. Task trace: ==2863==END OF ADDITIONAL INFO ==2863==ABORTING