Repository: flutter
Issue: Data race setting dart isolate snapshot instructions
Labels: engine,P2,team-engine,triaged-engine

```
[ RUN      ] ShellTest.OnPlatformViewDestroyWhenThreadsAreMerging
==================
WARNING: ThreadSanitizer: data race (pid=36256)
  Read of size 4 at 0x7b20000219e0 by thread T20:
    #0 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x2818a93)
    #1 kDartIsolateSnapshotInstructions ??:? (shell_unittests+0x4664d42)
    #2 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x28d5cab)
    #3 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x28d2fd3)
    #4 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x28d2db2)
    #5 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x29636d9)
    #6 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x2963541)
    #7 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x29634ed)
    #8 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x296346d)
    #9 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x296342d)
    #10 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x2961ed9)
    #11 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x24e2789)
    #12 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x24e2705)
    #13 kDartIsolateSnapshotInstructions ??:? (shell_unittests+0x2abb5c5)
    #14 kDartIsolateSnapshotInstructions ??:? (shell_unittests+0x2abb42a)
    #15 kDartIsolateSnapshotInstructions ??:? (shell_unittests+0x2adf41a)
    #16 kDartIsolateSnapshotInstructions ??:? (shell_unittests+0x2adf3ad)
    #17 kDartIsolateSnapshotInstructions ??:? (shell_unittests+0x2abb3a2)
    #18 kDartIsolateSnapshotInstructions ??:? (shell_unittests+0x2aba05d)
    #19 kDartIsolateSnapshotInstructions ??:? (shell_unittests+0x2ad9894)
    #20 kDartIsolateSnapshotInstructions ??:? (shell_unittests+0x2ad979d)
    #21 kDartIsolateSnapshotInstructions ??:? (shell_unittests+0x2ad9705)
    #22 kDartIsolateSnapshotInstructions ??:? (shell_unittests+0x2ad92c8)
    #23 __cxa_guard_abort ??:? (shell_unittests+0x23de20e)

  Previous write of size 4 at 0x7b20000219e0 by main thread:
    #0 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x28188bc)
    #1 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x2659c60)
    #2 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x265a0bc)
    #3 testing::ScopedTrace::~ScopedTrace() ??:? (shell_unittests+0x585b9e7)
    #4 testing::ScopedTrace::~ScopedTrace() ??:? (shell_unittests+0x58422b2)
    #5 testing::Test::Run() ??:? (shell_unittests+0x582c84d)
    #6 testing::TestInfo::Run() ??:? (shell_unittests+0x582d172)
    #7 testing::TestSuite::Run() ??:? (shell_unittests+0x582d9fc)
    #8 testing::internal::UnitTestImpl::RunAllTests() ??:? (shell_unittests+0x58390b2)
    #9 testing::ScopedTrace::~ScopedTrace() ??:? (shell_unittests+0x5861077)
    #10 testing::ScopedTrace::~ScopedTrace() ??:? (shell_unittests+0x5844e32)
    #11 testing::UnitTest::Run() ??:? (shell_unittests+0x5838b01)
    #12 kDartIsolateSnapshotInstructions ??:? (shell_unittests+0x54bf4fd)
    #13 kDartIsolateSnapshotInstructions ??:? (shell_unittests+0x54bf2a6)

  Location is heap block of size 128 at 0x7b2000021980 allocated by main thread:
    #0 operator new(unsigned long) ??:? (shell_unittests+0x24655f6)
    #1 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x24901f5)
    #2 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x27bfbf3)
    #3 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x26d8007)
    #4 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x265a01b)
    #5 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x2659837)
    #6 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x265a0bc)
    #7 testing::ScopedTrace::~ScopedTrace() ??:? (shell_unittests+0x585b9e7)
    #8 testing::ScopedTrace::~ScopedTrace() ??:? (shell_unittests+0x58422b2)
    #9 testing::Test::Run() ??:? (shell_unittests+0x582c84d)
    #10 testing::TestInfo::Run() ??:? (shell_unittests+0x582d172)
    #11 testing::TestSuite::Run() ??:? (shell_unittests+0x582d9fc)
    #12 testing::internal::UnitTestImpl::RunAllTests() ??:? (shell_unittests+0x58390b2)
    #13 testing::ScopedTrace::~ScopedTrace() ??:? (shell_unittests+0x5861077)
    #14 testing::ScopedTrace::~ScopedTrace() ??:? (shell_unittests+0x5844e32)
    #15 testing::UnitTest::Run() ??:? (shell_unittests+0x5838b01)
    #16 kDartIsolateSnapshotInstructions ??:? (shell_unittests+0x54bf4fd)
    #17 kDartIsolateSnapshotInstructions ??:? (shell_unittests+0x54bf2a6)

  Thread T20 'io.flutter.test.OnPlatformViewDestroyWhenThreadsAreMerging..ras' (tid=41434, running) created by main thread at:
    #0 pthread_create ??:? (shell_unittests+0x23de2ad)
    #1 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x24aa9d9)
    #2 kDartIsolateSnapshotInstructions ??:? (shell_unittests+0x2ad90b9)
    #3 kDartIsolateSnapshotInstructions ??:? (shell_unittests+0x2ad8d6f)
    #4 kDartIsolateSnapshotInstructions ??:? (shell_unittests+0x2ad8c91)
    #5 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x29bd28c)
    #6 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x29bc96d)
    #7 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x29bcdf2)
    #8 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x29bcb92)
    #9 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x27e4b59)
    #10 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x2788039)
    #11 operator delete[](void*, std::align_val_t) ??:? (shell_unittests+0x2787fd2)
    #12 testing::ScopedTrace::~ScopedTrace() ??:? (shell_unittests+0x585bd47)
    #13 testing::ScopedTrace::~ScopedTrace() ??:? (shell_unittests+0x5842832)
    #14 testing::TestInfo::Run() ??:? (shell_unittests+0x582d14b)
    #15 testing::TestSuite::Run() ??:? (shell_unittests+0x582d9fc)
    #16 testing::internal::UnitTestImpl::RunAllTests() ??:? (shell_unittests+0x58390b2)
    #17 testing::ScopedTrace::~ScopedTrace() ??:? (shell_unittests+0x5861077)
    #18 testing::ScopedTrace::~ScopedTrace() ??:? (shell_unittests+0x5844e32)
    #19 testing::UnitTest::Run() ??:? (shell_unittests+0x5838b01)
    #20 kDartIsolateSnapshotInstructions ??:? (shell_unittests+0x54bf4fd)
    #21 kDartIsolateSnapshotInstructions ??:? (shell_unittests+0x54bf2a6)

SUMMARY: ThreadSanitizer: data race ??:? in operator delete[](void*, std::align_val_t)
==================
```