Files
Clément Pasteau 0cd03bbfa1 Make wasm test faster (#8829)
show in developer changelog
2026-07-15 09:29:13 +02:00

16 lines
860 B
JavaScript

// If running under ASAN, disable the "container overflow" checks because of false positives
// with std::vector<gd::String>. See https://github.com/google/sanitizers/wiki/AddressSanitizerContainerOverflow.
// Also append options from the ASAN_OPTIONS environment variable when running in Node.js,
// as Emscripten only reads them from Module['ASAN_OPTIONS'] (not from the environment).
if (Module['ASAN_OPTIONS'] === undefined) {
var envAsanOptions =
typeof process !== 'undefined' && process.env && process.env.ASAN_OPTIONS
? ':' + process.env.ASAN_OPTIONS
: '';
Module['ASAN_OPTIONS'] = 'detect_container_overflow=0' + envAsanOptions;
}
// Prevent calling process["exit"] when there is a abort/runtime crash
// (useful for tests when running ASAN, to see the logs).
if (Module.noExitRuntime === undefined)
Module.noExitRuntime = true;