| V8 is not -fsanitize=null clean | |||||
| Reported by svenpanne@chromium.org, Dec 19 2014 | Back to list | ||||
V8 uses the bad idea (a.k.a. "technique") of pretending that JavaScript entities are C++ pointers all over the place, see objects.h and friends. Combined with our Smi encoding, we actually call via a "null" pointer quite a lot. Fundamentally this is fixable by making the functions static and explicitly passing the entity as parameter, but that's a tremendous amount of work. Nevertheless, this is highly dangerous: We already had at least one bug caused by the fact that the C++ compiler optimized away some code on the assumption that "this" is never null. There could be even more assumptions made by the compiler, e.g. alignment (= values of the lower bits), so we are on very thin ice here and should remove this madness in the long run.
Comment 1
by
svenpanne@chromium.org,
Dec 19 2014
,
Apr 29 2015
,
Dec 11 2015
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68853 for another example.
,
Mar 4 2016
Is anyone looking at this? Compilers are getting more aggressive with assuming that "this" can not be a null pointer.
,
Mar 8 2016
Nobody is currently working on this, and it's not on the short-term agenda either.
,
Apr 20 2016
It's starting to affect Node.js with gcc 6.0.0.
,
Apr 20 2016
,
Aug 29 2016
Another issue from Node.js: https://github.com/nodejs/node/issues/8310
,
Sep 8 2016
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/dbefc8ee2e9ee6e41b83f3d09c788c34bc923b43 commit dbefc8ee2e9ee6e41b83f3d09c788c34bc923b43 Author: ofrobots <ofrobots@google.com> Date: Thu Sep 08 15:49:09 2016 Use -fno-delete-null-pointer-checks with gcc builds R=bmeurer@chromium.org, jochen@chromium.org, machenbach@chromium.org BUG=v8:3782 Review-Url: https://codereview.chromium.org/2310513002 Cr-Commit-Position: refs/heads/master@{#39286} [modify] https://crrev.com/dbefc8ee2e9ee6e41b83f3d09c788c34bc923b43/BUILD.gn [modify] https://crrev.com/dbefc8ee2e9ee6e41b83f3d09c788c34bc923b43/gypfiles/toolchain.gypi
,
Sep 8 2016
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/20d427a1e22776762e1382dd4c01dc0a896a13b4 commit 20d427a1e22776762e1382dd4c01dc0a896a13b4 Author: ofrobots <ofrobots@google.com> Date: Thu Sep 08 15:55:43 2016 Revert of Use -fno-delete-null-pointer-checks with gcc builds (patchset #2 id:20001 of https://codereview.chromium.org/2310513002/ ) Reason for revert: Fails on MIPS: https://build.chromium.org/p/client.v8.ports/builders/V8%20Mips%20-%20builder/builds/3653 Original issue's description: > Use -fno-delete-null-pointer-checks with gcc builds > > R=bmeurer@chromium.org, jochen@chromium.org, machenbach@chromium.org > BUG=v8:3782 > > Committed: https://crrev.com/dbefc8ee2e9ee6e41b83f3d09c788c34bc923b43 > Cr-Commit-Position: refs/heads/master@{#39286} TBR=jochen@chromium.org,bmeurer@chromium.org,machenbach@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=v8:3782 Review-Url: https://codereview.chromium.org/2328563002 Cr-Commit-Position: refs/heads/master@{#39287} [modify] https://crrev.com/20d427a1e22776762e1382dd4c01dc0a896a13b4/BUILD.gn [modify] https://crrev.com/20d427a1e22776762e1382dd4c01dc0a896a13b4/gypfiles/toolchain.gypi
,
Mar 23 2017
|
|||||
| ► Sign in to add a comment | |||||