File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 35
35
# Don't bake anything extra into the snapshot.
36
36
'v8_use_external_startup_data%' : 0 ,
37
37
38
+ # Disable V8 untrusted code mitigations.
39
+ # See https://github.com/v8/v8/wiki/Untrusted-code-mitigations
40
+ 'v8_untrusted_code_mitigations' : 'false' ,
41
+
38
42
# Some STL containers (e.g. std::vector) do not preserve ABI compatibility
39
43
# between debug and non-debug mode.
40
44
'disable_glibcxx_debug' : 1 ,
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ require ( '../common' ) ;
4
+ const assert = require ( 'assert' ) ;
5
+ const { execFileSync } = require ( 'child_process' ) ;
6
+
7
+ // This test checks that untrusted code mitigations in V8 are disabled
8
+ // by default.
9
+
10
+ const v8Options = execFileSync ( process . execPath , [ '--v8-options' ] ) . toString ( ) ;
11
+
12
+ const untrustedFlag = v8Options . indexOf ( '--untrusted-code-mitigations' ) ;
13
+ assert . notStrictEqual ( untrustedFlag , - 1 ) ;
14
+
15
+ const nextFlag = v8Options . indexOf ( '--' , untrustedFlag + 2 ) ;
16
+ const slice = v8Options . substring ( untrustedFlag , nextFlag ) ;
17
+
18
+ assert ( slice . match ( / t y p e : b o o l d e f a u l t : f a l s e / ) ) ;
You can’t perform that action at this time.
0 commit comments