Repository navigation
ToString(Object) sometimes returns [object Null] #12411
Description
Activity
- addedv8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.questionIssues asking questions about Node.js.Issues asking questions about Node.js.
on Apr 14, 2017 I don't think it's out of the ordinary, seeing as how
nullis considered an object type in Javascript. For example:> Object.prototype.toString.call(null) '[object Null]'It could be a bug though whose fix didn't get backported to 5.5 though.
This is not about what happens when you stringify
null.[object Null]is returned when you stringify an ordinary object. See also this Stackoverflow, which has a great log of the behaviour of the object.Also see in the linked v8 issue where an array is stringified, but
[object Null]gets returned (in full codegen, seems to be fixed in ignition).The V8 in v7.x has the same bug. I'll prepare a back-port.
- removedquestionIssues asking questions about Node.js.Issues asking questions about Node.js.
on Apr 14, 2017 This has been troubling us for months! So happy the issue has been found. Getting the fix out in a patch release soon would be great for us. Thanks.
@holm I would assume we do another v7.x patch release next week, as usual.
Great, thanks a lot for the quick work (as usual)!
- added a commit that references this issue
on Apr 19, 2017 Fixed in f882f47, should be in the next v7.x release.
Reacted by Christian HolmAny idea when the next v7.x release might be? This bug is hurting us quite a bit, and a new release would be wonderful. Thanks as always.
Next Tuesday, I think. I'm not on the release team though.
Ben is correct. I have a release almost ready but decided to hold off due to #12663
- added a commit that references this issue
on May 1, 2017
Linux web 4.4.0-18-generic #34~14.04.1-Ubuntu SMP Thu Apr 7 18:31:54 UTC 2016 x86_64 x86_64 x86_64 GNU/LinuxI think we're encountering this bug in our staging and prod environments under heavy load. It does not occur in node v6, but only v7.
I can't reproduce this in the node console (with the v8 repro), but it seems like the v8 code is the same in node.
Is it possible to somehow verify this also applies to node and backport that v8 fix into node v7?