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

Overriding the Error object causes infinite recursion

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 3.3.1
    • Component/s: JavaScript
    • None
    • Fully Compatible
    • ALL
    • 0

      Running the following code on OS X triggers a InternalError: too much recursion. But on Ubuntu the recursion does not terminate and the process is killed in a few minutes for consuming too much memory.

      Error = assert.doesNotThrow;
      assert.commandWorked(0);
      

      stacktrace on OS X; on Ubuntu it's the same minus the last line:

      assert: threw unexpected exception: TypeError: func.apply is not a function : undefined
      assert: threw unexpected exception: TypeError: func.apply is not a function : undefined
      assert: threw unexpected exception: TypeError: func.apply is not a function : undefined
      assert: threw unexpected exception: TypeError: func.apply is not a function : undefined
      ...... (roughly 880 lines on OS X)
      2016-02-16T14:59:49.917-0500 E QUERY    [thread1] warning: log line attempted (78kB) over max size (10kB), printing beginning and end ... InternalError: too much recursion :
      

      ulimit -s is 8192 for both OSes.

            Assignee:
            backlog-server-platform DO NOT USE - Backlog - Platform Team
            Reporter:
            robert.guo@mongodb.com Robert Guo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: