Skip to content

Commit 7f44ecf

Browse files
bnoordhuisrvagg
authored andcommitted
build: turn on -fno-delete-null-pointer-checks
Work around spec violations in V8 where it checks that `this == NULL`. GCC 6 started exploiting this particular kind of UB, resulting in runtime crashes. Fixes: #6724 PR-URL: #6738 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent ffc55f7 commit 7f44ecf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

common.gypi

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,11 @@
179179
}],
180180
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
181181
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', '-pthread', ],
182-
'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
182+
'cflags_cc': [
183+
'-fno-delete-null-pointer-checks',
184+
'-fno-exceptions',
185+
'-fno-rtti',
186+
],
183187
'ldflags': [ '-pthread', '-rdynamic' ],
184188
'target_conditions': [
185189
['_type=="static_library"', {

0 commit comments

Comments
 (0)