/**1* @license2* Copyright 2019 The Emscripten Authors3* SPDX-License-Identifier: MIT4*/56#if !USE_ASAN7#error "should only be included in USE_ASAN mode"8#endif910// C versions of asan_js_{load|store} will be used from compiled code, which have11// ASan instrumentation on them. However, until the wasm module is ready, we12// must access things directly.1314function _asan_js_check_index(arr, index, asanFn) {15#if EXIT_RUNTIME16if (runtimeInitialized && !runtimeExited) {17#else18if (runtimeInitialized) {19#endif20const elemSize = arr.BYTES_PER_ELEMENT;21asanFn(index * elemSize, elemSize);22}23return index;24}252627