Skip to content

ToString(Object) sometimes returns [object Null] #12411

Description

@Sebmaster
  • Version: 7.7.1
  • Platform: 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/Linux
  • Subsystem: v8

I 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?

Activity

  1. added
    v8 engineIssues and PRs related to the V8 dependency.
    questionIssues asking questions about Node.js.
    on Apr 14, 2017
  2. mscdex commented on Apr 14, 2017

    @mscdex
    Contributor

    I don't think it's out of the ordinary, seeing as how null is 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.

  3. Sebmaster commented on Apr 14, 2017

    @Sebmaster
    ContributorAuthor

    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).

  4. bnoordhuis commented on Apr 14, 2017

    @bnoordhuis
    Member

    The V8 in v7.x has the same bug. I'll prepare a back-port.

  5. bnoordhuis commented on Apr 14, 2017

    @bnoordhuis
    Member
  6. removed
    questionIssues asking questions about Node.js.
    on Apr 14, 2017
  7. holm commented on Apr 14, 2017

    @holm

    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.

  8. addaleax commented on Apr 15, 2017

    @addaleax
    Member

    @holm I would assume we do another v7.x patch release next week, as usual.

  9. holm commented on Apr 15, 2017

    @holm

    Great, thanks a lot for the quick work (as usual)!

  10. bnoordhuis commented on Apr 19, 2017

    @bnoordhuis
    Member

    Fixed in f882f47, should be in the next v7.x release.

  11. holm commented on Apr 27, 2017

    @holm

    Any 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.

  12. bnoordhuis commented on Apr 28, 2017

    @bnoordhuis
    Member

    Next Tuesday, I think. I'm not on the release team though.

  13. evanlucas commented on Apr 28, 2017

    @evanlucas
    Contributor

    Ben is correct. I have a release almost ready but decided to hold off due to #12663

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions