Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.

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/node#6724
PR-URL: nodejs/node#6737
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
  • Loading branch information
bnoordhuis authored and jBarz committed Nov 4, 2016
1 parent d19dc86 commit 2f9e70f
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 @@ -181,7 +181,11 @@
}],
[ 'OS in "linux freebsd openbsd solaris android"', {
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
'cflags_cc': [
'-fno-delete-null-pointer-checks',
'-fno-exceptions',
'-fno-rtti',
],
'ldflags': [ '-rdynamic' ],
'target_conditions': [
['_type=="static_library"', {
Expand Down

0 comments on commit 2f9e70f

Please sign in to comment.