-
Notifications
You must be signed in to change notification settings - Fork 30.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/)); |