Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
build: disable V8 untrusted code mitigations
Refs: https://github.com/v8/v8/wiki/Untrusted-code-mitigations PR-URL: #19222 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Yang Guo <yangguo@chromium.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
- Loading branch information
Showing
with
22 additions
and 0 deletions.
@@ -0,0 +1,18 @@ | ||
'use strict'; | ||
|
||
require('../common'); | ||
const assert = require('assert'); | ||
const { execFileSync } = require('child_process'); | ||
|
||
// This test checks that untrusted code mitigations in V8 are disabled | ||
// by default. | ||
|
||
const v8Options = execFileSync(process.execPath, ['--v8-options']).toString(); | ||
|
||
const untrustedFlag = v8Options.indexOf('--untrusted-code-mitigations'); | ||
assert.notStrictEqual(untrustedFlag, -1); | ||
|
||
const nextFlag = v8Options.indexOf('--', untrustedFlag + 2); | ||
const slice = v8Options.substring(untrustedFlag, nextFlag); | ||
|
||
assert(slice.match(/type: bool default: false/)); |