| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 52f8dcf commit 05cb16d
8 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -45,7 +45,6 @@ jobs: | |||
| 45 | 45 | CXX: clang++ | |
| 46 | 46 | LINK: clang++ | |
| 47 | 47 | CONFIG_FLAGS: --enable-asan | |
| 48 | - ASAN: true | ||
| 49 | 48 | steps: | |
| 50 | 49 | - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
| 51 | 50 | with: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -128,7 +128,7 @@ const isFreeBSD = process.platform === 'freebsd'; | |||
| 128 | 128 | const isOpenBSD = process.platform === 'openbsd'; | |
| 129 | 129 | const isLinux = process.platform === 'linux'; | |
| 130 | 130 | const isOSX = process.platform === 'darwin'; | |
| 131 | - const isAsan = process.env.ASAN !== undefined; | ||
| 131 | + const isASan = process.config.variables.asan === 1; | ||
| 132 | 132 | const isPi = (() => { | |
| 133 | 133 | try { | |
| 134 | 134 | // Normal Raspberry Pi detection is to find the `Raspberry Pi` string in | |
@@ -965,7 +965,7 @@ const common = { | |||
| 965 | 965 | hasMultiLocalhost, | |
| 966 | 966 | invalidArgTypeHelper, | |
| 967 | 967 | isAlive, | |
| 968 | - isAsan, | ||
| 968 | + isASan, | ||
| 969 | 969 | isDumbTerminal, | |
| 970 | 970 | isFreeBSD, | |
| 971 | 971 | isLinux, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,8 +4,8 @@ | |||
| 4 | 4 | const common = require('../common'); | |
| 5 | 5 | if (!common.hasCrypto) | |
| 6 | 6 | common.skip('missing crypto'); | |
| 7 | - if (process.config.variables.asan) | ||
| 8 | - common.skip('ASAN messes with memory measurements'); | ||
| 7 | + if (common.isASan) | ||
| 8 | + common.skip('ASan messes with memory measurements'); | ||
| 9 | 9 | ||
| 10 | 10 | const assert = require('assert'); | |
| 11 | 11 | const crypto = require('crypto'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,8 +7,8 @@ if (!common.hasCrypto) | |||
| 7 | 7 | if (common.isWindows) | |
| 8 | 8 | common.skip('Not supported on Windows'); | |
| 9 | 9 | ||
| 10 | - if (process.config.variables.asan) | ||
| 11 | - common.skip('ASAN does not play well with secure heap allocations'); | ||
| 10 | + if (common.isASan) | ||
| 11 | + common.skip('ASan does not play well with secure heap allocations'); | ||
| 12 | 12 | ||
| 13 | 13 | const assert = require('assert'); | |
| 14 | 14 | const { fork } = require('child_process'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,7 +9,7 @@ if (!common.hasCrypto) | |||
| 9 | 9 | common.skip('missing crypto'); | |
| 10 | 10 | if (!common.isLinux) | |
| 11 | 11 | common.skip('linux only'); | |
| 12 | - if (common.isAsan) | ||
| 12 | + if (common.isASan) | ||
| 13 | 13 | common.skip('strace does not work well with address sanitizer builds'); | |
| 14 | 14 | if (spawnSync('strace').error !== undefined) { | |
| 15 | 15 | common.skip('missing strace'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,8 +18,8 @@ for (let i = 0; i < 1000000; i++) { | |||
| 18 | 18 | async function main() { | |
| 19 | 19 | await common.gcUntil('RSS should go down', () => { | |
| 20 | 20 | const after = process.memoryUsage.rss(); | |
| 21 | - if (process.config.variables.asan) { | ||
| 22 | - console.log(`asan: before=${before} after=${after}`); | ||
| 21 | + if (common.isASan) { | ||
| 22 | + console.log(`ASan: before=${before} after=${after}`); | ||
| 23 | 23 | return after < before * 10; | |
| 24 | 24 | } else if (process.config.variables.node_builtin_modules_path) { | |
| 25 | 25 | console.log(`node_builtin_modules_path: before=${before} after=${after}`); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,8 +24,8 @@ | |||
| 24 | 24 | ||
| 25 | 25 | const common = require('../common'); | |
| 26 | 26 | ||
| 27 | - if (process.config.variables.asan) { | ||
| 28 | - common.skip('ASAN messes with memory measurements'); | ||
| 27 | + if (common.isASan) { | ||
| 28 | + common.skip('ASan messes with memory measurements'); | ||
| 29 | 29 | } | |
| 30 | 30 | ||
| 31 | 31 | const assert = require('assert'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1588,8 +1588,9 @@ def get_env_type(vm, options_type, context): | |||
| 1588 | 1588 | return env_type | |
| 1589 | 1589 | ||
| 1590 | 1590 | ||
| 1591 | - def get_asan_state(): | ||
| 1592 | - return "on" if os.environ.get('ASAN') is not None else "off" | ||
| 1591 | + def get_asan_state(vm, context): | ||
| 1592 | + asan = Execute([vm, '-p', 'process.config.variables.asan'], context).stdout | ||
| 1593 | + return "on" if asan == "1" else "off" | ||
| 1593 | 1594 | ||
| 1594 | 1595 | ||
| 1595 | 1596 | def Main(): | |
@@ -1684,7 +1685,7 @@ def Main(): | |||
| 1684 | 1685 | 'system': utils.GuessOS(), | |
| 1685 | 1686 | 'arch': vmArch, | |
| 1686 | 1687 | 'type': get_env_type(vm, options.type, context), | |
| 1687 | - 'asan': get_asan_state(), | ||
| 1688 | + 'asan': get_asan_state(vm, context), | ||
| 1688 | 1689 | } | |
| 1689 | 1690 | test_list = root.ListTests([], path, context, arch, mode) | |
| 1690 | 1691 | unclassified_tests += test_list | |
| Back | FazBrowse Home | New Git URL |
0 commit comments