Calling EJSON.stringify on a cursor results in stack overflow

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Critical - P2
    • 0.13.2
    • Affects Version/s: 0.12.0
    • Component/s: Bson
    • Iteration Chicago
    • Not Needed

      Enterprise replset [direct: primary]> EJSON.stringify(db.test.find())
      internal/async_hooks.js:189
      function emitInitNative(asyncId, type, triggerAsyncId, resource) {
                             ^
      
      RangeError: Maximum call stack size exceeded
      (Use `-- --trace-uncaught ...` to show where the exception was thrown)
      

      The async_hooks involvement may or may not be a red herring, it is used by the REPL under the hood for async tracking, but I suspect that the error itself would also reproduce in a non-REPL environment.

              Assignee:
              Anna Henningsen
              Reporter:
              Anna Henningsen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: