mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-08-25 12:23:58 -04:00
0cd03bbfa1
show in developer changelog
16 lines
860 B
JavaScript
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; |