Note: Google Test filter = DawnCopyStrategyStackUAR.* [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from DawnCopyStrategyStackUAR [ RUN ] DawnCopyStrategyStackUAR.MapAsyncCallbackOutlivesStackOnWaitAnyFailure Error: Timeout waits are either not enabled or not supported. [1195:1195:ERROR:gpu/command_buffer/service/shared_image/dawn_copy_strategy.cc:348] WaitAny failed while mapping staging buffer for read. ================================================================= ==1195==ERROR: AddressSanitizer: stack-use-after-return on address 0x795faf87e350 at pc 0x61096afd4db9 bp 0x7ffd1ddae860 sp 0x7ffd1ddae858 WRITE of size 1 at 0x795faf87e350 thread T0 #0 0x61096afd4db8 in gpu::DawnCopyStrategy::CopyFromTextureToBacking(wgpu::Texture, gpu::SharedImageBacking*, wgpu::Device)::$_1::__invoke(wgpu::MapAsyncStatus, wgpu::StringView, bool*) gpu/command_buffer/service/shared_image/dawn_copy_strategy.cc:342:20 #1 0x6109634e46dc in dawn::native::BufferBase::MapAsyncEvent::RunCallback(WGPUMapAsyncStatus, std::__Cr::basic_string_view>) third_party/dawn/src/dawn/native/Buffer.cpp:280:9 #2 0x6109634e3ca7 in dawn::native::BufferBase::MapAsyncEvent::Complete(dawn::EventCompletionType) third_party/dawn/src/dawn/native/Buffer.cpp:293:13 #3 0x61096d2128ba in std::__Cr::__call_once(unsigned long volatile&, void*, void (*)(void*)) third_party/libc++/src/src/call_once.cpp:58:5 #4 0x6109635c3153 in dawn::native::EventManager::~EventManager() gen/third_party/libc++/src/include/__mutex/once_flag.h:135:5 #5 0x610963615f08 in dawn::native::InstanceBase::~InstanceBase() third_party/dawn/src/dawn/native/Instance.cpp:268:29 #6 0x610963616cfa in non-virtual thunk to dawn::native::InstanceBase::~InstanceBase() third_party/dawn/src/dawn/native/Instance.cpp:268:29 #7 0x610963617235 in dawn::native::InstanceBase::DeleteThis() third_party/dawn/src/dawn/native/Instance.cpp:291:17 #8 0x61096a4d8c17 in dawn::native::Instance::~Instance() third_party/dawn/src/dawn/common/RefCounted.h:90:25 #9 0x61096183f538 in gpu::DawnCopyStrategyStackUAR_MapAsyncCallbackOutlivesStackOnWaitAnyFailure_Test::TestBody() gen/third_party/libc++/src/include/__memory/unique_ptr.h:74:5 #10 0x6109645515fb in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc #11 0x610964554167 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2892:11 #12 0x6109645561e3 in testing::TestSuite::Run() third_party/googletest/src/googletest/src/gtest.cc:3070:30 #13 0x610964584ce4 in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:6062:44 #14 0x61096458385a in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc #15 0x610966eb4160 in base::TestSuite::Run() base/test/test_suite.cc:440:16 #16 0x61096199a011 in base::internal::Invoker, base::internal::BindState>, int ()>::RunOnce(base::internal::BindStateBase*) base/functional/bind_internal.h:740:12 #17 0x610966ebb2db in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback, unsigned long, int, unsigned long, bool, base::RepeatingCallback, base::OnceCallback) base/functional/callback.h:155:12 #18 0x610966ebbc34 in base::LaunchUnitTestsSerially(int, char**, base::OnceCallback) base/test/launcher/unit_test_launcher.cc:347:10 #19 0x610961999aa8 in main gpu/command_buffer/tests/gl_tests_main.cc:52:10 #20 0x7d5fb2025249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 6196744a316dbd57c0fd8968df1680aac482cec4) Address 0x795faf87e350 is located in stack of thread T0 at offset 848 in frame #0 0x61096afd248f in gpu::DawnCopyStrategy::CopyFromTextureToBacking(wgpu::Texture, gpu::SharedImageBacking*, wgpu::Device) gpu/command_buffer/service/shared_image/dawn_copy_strategy.cc:268 This frame has 15 object(s): [32, 56) 'internal_usage_desc' (line 269) [96, 120) 'command_encoder_desc' (line 271) [160, 168) 'format' (line 279) [192, 496) 'ref.tmp' (line 287) [560, 568) 'agg.tmp.ensured' [592, 624) 'texture_copy' (line 308) [656, 680) 'buffer_copy' (line 312) [720, 732) 'extent' (line 320) [752, 760) 'commandBuffer' (line 326) [784, 808) 'staging_pixmaps' (line 332) [848, 849) 'success' (line 337) <== Memory access at offset 848 is inside this variable [864, 880) 'wait_info' (line 338) [896, 1200) 'ref.tmp' (line 348) [1264, 1568) 'ref.tmp' (line 353) [1632, 1672) 'ref.tmp' (line 357) HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-use-after-return gpu/command_buffer/service/shared_image/dawn_copy_strategy.cc:342:20 in gpu::DawnCopyStrategy::CopyFromTextureToBacking(wgpu::Texture, gpu::SharedImageBacking*, wgpu::Device)::$_1::__invoke(wgpu::MapAsyncStatus, wgpu::StringView, bool*) Shadow bytes around the buggy address: 0x795faf87e080: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x795faf87e100: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x795faf87e180: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x795faf87e200: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x795faf87e280: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 =>0x795faf87e300: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5[f5]f5 f5 f5 f5 f5 0x795faf87e380: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x795faf87e400: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x795faf87e480: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x795faf87e500: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 0x795faf87e580: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 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 ==1195==ADDITIONAL INFO ==1195==Note: Please include this section with the ASan report. Task trace: ==1195==END OF ADDITIONAL INFO ==1195==ABORTING