Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-19582

v8 out of memory issue from creation of large string

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 3.1.6
    • Component/s: Shell
    • Labels:
      None
    • ALL
    • Hide

      1. Go into the mongo shell (version 3.1.6 or earlier)
      2. Run the following:

      y = Math.pow(10, 8)
      var x = 'asdf'.pad(y);
      

      Expected result: x becomes a giant string that I was planning to use to generate a DocumentTooLarge error

      Actual result: the shell breaks.

      Show
      1. Go into the mongo shell (version 3.1.6 or earlier) 2. Run the following: y = Math .pow(10, 8) var x = 'asdf' .pad(y); Expected result: x becomes a giant string that I was planning to use to generate a DocumentTooLarge error Actual result: the shell breaks.

      This issue is gone as of this morning's build but was present in 3.1.6.

      If I try to create a large (100 MB) string, v8 stops working and says it's out of memory.

      This was a bummer because people might end up frustrated with a non-working shell.

            Assignee:
            Unassigned Unassigned
            Reporter:
            william.cross William Cross
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: