MTL_DEBUG_LAYER=1 ANGLE_DEFAULT_PLATFORM=metal ./out/asan/angle_end2end_tests --gtest_filter="*StaleImageSizeHeapOverflowWrite*" Note: Google Test filter = *StaleImageSizeHeapOverflowWrite* [==========] Running 5 tests from 1 test suite. [----------] Global test environment set-up. [----------] 5 tests from Texture2DTestES3 [ RUN ] Texture2DTestES3.StaleImageSizeHeapOverflowWrite/ES3_OpenGL [ OK ] Texture2DTestES3.StaleImageSizeHeapOverflowWrite/ES3_OpenGL (426 ms) [ RUN ] Texture2DTestES3.StaleImageSizeHeapOverflowWrite/ES3_Vulkan_SwiftShader [ OK ] Texture2DTestES3.StaleImageSizeHeapOverflowWrite/ES3_Vulkan_SwiftShader (308 ms) [ RUN ] Texture2DTestES3.StaleImageSizeHeapOverflowWrite/ES3_Metal 2026-04-02 11:41:41.977 angle_end2end_tests[54028:13761319] Using Metal Device: Apple M2 -[MTLDebugBlitCommandEncoder validateCopyFromBuffer:sourceOffset:sourceBytesPerRow:sourceBytesPerImage:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:options:]:759: failed assertion `Copy From Buffer Validation (destinationOrigin.x + sourceSize.width)(128) must be <= width(8). (destinationOrigin.y + sourceSize.height)(128) must be <= height(8). ' Signal 6: No results file specified. Backtrace: angle::Handler(int) (+0x78) _sigtramp (+0x38) pthread_kill (+0x128) abort (+0x7c) err (+0x0) bool MTLGetEnvCase(char const*, MTLErrorModeType&, std::__1::vector, std::__1::allocator>> const&) (.cold.1) (+0x0) MTLReportFailure (+0x240) _MTLMessageContextEndNSErrorOrAbort(_MTLMessageContext*, bool, NSString*, unsigned long) (+0x3e0) -[MTLDebugBlitCommandEncoder validateCopyFromBuffer:sourceOffset:sourceBytesPerRow:sourceBytesPerImage:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:options:] (+0x344) -[MTLDebugBlitCommandEncoder copyFromBuffer:sourceOffset:sourceBytesPerRow:sourceBytesPerImage:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:options:] (+0x7c) rx::mtl::BlitCommandEncoder::copyBufferToTexture(std::__Cr::shared_ptr const&, unsigned long, unsigned long, unsigned long, MTLSize, std::__Cr::shared_ptr const&, unsigned int, gl::LevelIndexWrapper, MTLOrigin, unsigned long) (+0x454) rx::(anonymous namespace)::CopyBufferToOriginalTextureIfDstIsAView(rx::ContextMtl*, rx::mtl::BlitCommandEncoder*, std::__Cr::shared_ptr const&, unsigned long, unsigned long, unsigned long, MTLSize, std::__Cr::shared_ptr const&, unsigned int, gl::LevelIndexWrapper const&, MTLOrigin, unsigned long) (+0x2d8) rx::(anonymous namespace)::UploadTextureContents(gl::Context const*, angle::Format const&, MTLRegion const&, gl::LevelIndexWrapper const&, unsigned int, unsigned char const*, unsigned long, unsigned long, bool, std::__Cr::shared_ptr const&) (+0xcfc) rx::TextureMtl::setPerSliceSubImage(gl::Context const*, int, MTLRegion const&, gl::InternalFormat const&, unsigned int, angle::Format const&, unsigned long, unsigned long, gl::Buffer*, unsigned char const*, rx::ImageDefinitionMtl const&) (+0x328) rx::TextureMtl::setSubImageImpl(gl::Context const*, gl::ImageIndex const&, gl::Box const&, gl::InternalFormat const&, unsigned int, gl::PixelUnpackState const&, gl::Buffer*, unsigned char const*) (+0x4e0) gl::Texture::setSubImage(gl::Context*, gl::PixelUnpackState const&, gl::Buffer*, gl::TextureTarget, int, gl::Box const&, unsigned int, unsigned int, unsigned char const*) (+0x218) gl::Context::texSubImage2D(gl::TextureTarget, int, int, int, int, int, unsigned int, unsigned int, void const*) (+0x1e0) GL_TexSubImage2D (+0xf4) (anonymous namespace)::Texture2DTestES3_StaleImageSizeHeapOverflowWrite_Test::TestBody() (+0x85c) testing::Test::Run() (+0x1f4) testing::TestInfo::Run() (+0x238) testing::TestSuite::Run() (+0x700) testing::internal::UnitTestImpl::RunAllTests() (+0xf94) testing::UnitTest::Run() (+0x28c) angle::TestSuite::run() (+0x1160) main (+0x39c)