// Copyright 2021 the V8 project authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.// Try to catch TSAN issues with access to SharedArrayBuffer.functiononmessage([buf]){constarr=newInt32Array(buf);for(letval=1;val<100;++val)arr.fill(val);}constarr=newInt32Array(newSharedArrayBuffer(4));constworker=newWorker(`onmessage = ${onmessage}`,{type:'string'});worker.postMessage([arr.buffer]);// Wait until the worker starts filling the array.while(Atomics.load(arr)==0){}// Try setting a value on the shared array buffer that races with the fill.arr.set(arr);