-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function has non-object prototype 'null' in instanceof check, when I use node but it is fine in Browser #35730
Comments
@nodejs/util |
Remove a useless check on Object descriptor. It seems like js browsers engine dont do this check. Fixes: nodejs#35730
Remove a useless check on Object descriptor. It seems like js browsers engine dont do this check. Fixes: nodejs#35730
Are there any version of node that are not affected by this bug? |
v14.15.0 is also fail |
looks like v14-regression. v12 (both linux and win32-platform) works fine #!/bin/sh
node -e '
console.log(process.platform, process.versions);
function X () {}
X.prototype = null;
x = {};
x.constructor = X;
console.log(x);
'
# stdout
# win32 {
# node: '12.16.0',
# v8: '7.8.279.23-node.31',
# uv: '1.34.0',
# zlib: '1.2.11',
# brotli: '1.0.7',
# ares: '1.15.0',
# modules: '72',
# nghttp2: '1.40.0',
# napi: '5',
# llhttp: '2.0.4',
# http_parser: '2.9.3',
# openssl: '1.1.1d',
# cldr: '35.1',
# icu: '64.2',
# tz: '2019c',
# unicode: '12.1'
# }
# X { constructor: [Function: X] } |
(On Windows 10 - MSI x64 installer) So something between 14.4.0 and 14.5.0 probably created this bug. |
@Trystan-SA |
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> Fixes: nodejs#35730
This fails for me on I get
from hitting https://github.com/karma-runner/karma/blob/master/lib/server.js#L66 |
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> Fixes: #35730 PR-URL: #36178 Fixes: #36151 Refs: #35754 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> Fixes: #36151 PR-URL: #36178 Fixes: #35730 Refs: #35754 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> Fixes: #35730 PR-URL: #36178 Fixes: #36151 Refs: #35754 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> Fixes: nodejs#36151 PR-URL: nodejs#36178 Fixes: nodejs#35730 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> Fixes: nodejs#35730 PR-URL: nodejs#36178 Fixes: nodejs#36151 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Backport-PR-URL: nodejs#37100 Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> Fixes: nodejs#36151 PR-URL: nodejs#36178 Fixes: nodejs#35730 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Backport-PR-URL: nodejs#37100 Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> Fixes: nodejs#35730 PR-URL: nodejs#36178 Fixes: nodejs#36151 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Backport-PR-URL: nodejs#37100 Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> Fixes: nodejs#36151 PR-URL: nodejs#36178 Fixes: nodejs#35730 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Backport-PR-URL: nodejs#37100 Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> Fixes: nodejs#35730 PR-URL: nodejs#36178 Fixes: nodejs#36151 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Backport-PR-URL: nodejs#37100 Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> Fixes: nodejs#36151 PR-URL: nodejs#36178 Fixes: nodejs#35730 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Backport-PR-URL: nodejs#37100 Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> Fixes: nodejs#35730 PR-URL: nodejs#36178 Fixes: nodejs#36151 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Backport-PR-URL: nodejs#37100 Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> Fixes: nodejs#36151 PR-URL: nodejs#36178 Fixes: nodejs#35730 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Backport-PR-URL: nodejs#37100 Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> Fixes: nodejs#35730 PR-URL: nodejs#36178 Fixes: nodejs#36151 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> Backport-PR-URL: #37100 PR-URL: #36178 Fixes: #35730 Fixes: #36151 Refs: #35754 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> Backport-PR-URL: #37100 PR-URL: #36178 Fixes: #35730 Fixes: #36151 Refs: #35754 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> Backport-PR-URL: #37100 PR-URL: #36178 Fixes: #35730 Fixes: #36151 Refs: #35754 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
v14.17.0 OK |
I found another way to reproduce this one (on node v16.15.1):
Can we reopen the bug ? |
@npenin can you open a new issue? It's probably not the same bug. (for the audit log: removed an OoO auto-reply while I was here) |
Looks like a Node.js bug. Logging an object should never crash. The same works in the browser:
Node.js:
Browser:
node Verison: v14.14.0
The text was updated successfully, but these errors were encountered: