Skip to content

Commit

Permalink
build: turn on -fno-delete-null-pointer-checks
Browse files Browse the repository at this point in the history
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: nodejs#6724
  • Loading branch information
bnoordhuis committed May 13, 2016
1 parent ffc55f7 commit f2b219c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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"', {
Expand Down

0 comments on commit f2b219c

Please sign in to comment.