Browse Source

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: https://github.com/nodejs/node/issues/6724
PR-URL: https://github.com/nodejs/node/pull/6738
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
v0.10
Ben Noordhuis 9 years ago
committed by Rod Vagg
parent
commit
35b49ed4bb
  1. 6
      common.gypi

6
common.gypi

@ -179,7 +179,11 @@
}],
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', '-pthread', ],
'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
'cflags_cc': [
'-fno-delete-null-pointer-checks',
'-fno-exceptions',
'-fno-rtti',
],
'ldflags': [ '-pthread', '-rdynamic' ],
'target_conditions': [
['_type=="static_library"', {

Loading…
Cancel
Save