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

db.eval causes segfault if it returns NULL

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.9.7
    • Affects Version/s: 0.9.6
    • Component/s: JavaScript
    • Labels:
      None
    • Environment:
      Ubuntu

      $mongoDB->execute('function()

      { return null; }');

      causes segfault in server

      Stacktrace:

      Sun Jul 12 00:56:49 connection accepted from 192.168.226.1:7883
      Sun Jul 12 00:56:49 Got signal: 11 (Segmentation fault).
      Sun Jul 12 00:56:49 Last op: { opid: 2, active: 1, secs_running: 0, op: "query", ns: "example.$cmd", query: "{ query: { $eval: CodeWScope( function() { return null; }

      ,

      {...", inLock: 1, client: "192.168.226.1:51998" }

      Sun Jul 12 00:56:49 Backtrace:
      0x81a4284 0xb7f13420 0x81d23b3 0x80c1dee 0x813fc8f 0x8141402 0x81317d6 0x80ca8e0 0x80d2a55 0x815a954 0x815d286 0x81a0738 0x808cc3f 0x81a723d 0xb7dd64fb 0xb7d58e5e
      ./mongodb-linux-i686-2009-07-10/bin/mongod(_ZN5mongo10abruptQuitEi+0x574) [0x81a4284]
      [0xb7f13420]
      ./mongodb-linux-i686-2009-07-10/bin/mongod [0x81d23b3]
      ./mongodb-linux-i686-2009-07-10/bin/mongod [0x80c1dee]
      ./mongodb-linux-i686-2009-07-10/bin/mongod [0x813fc8f]
      ./mongodb-linux-i686-2009-07-10/bin/mongod [0x8141402]
      ./mongodb-linux-i686-2009-07-10/bin/mongod [0x81317d6]
      ./mongodb-linux-i686-2009-07-10/bin/mongod [0x80ca8e0]
      ./mongodb-linux-i686-2009-07-10/bin/mongod [0x80d2a55]
      ./mongodb-linux-i686-2009-07-10/bin/mongod [0x815a954]
      ./mongodb-linux-i686-2009-07-10/bin/mongod [0x815d286]
      ./mongodb-linux-i686-2009-07-10/bin/mongod(_ZN5mongo10connThreadEv+0x278) [0x81a0738]
      ./mongodb-linux-i686-2009-07-10/bin/mongod [0x808cc3f]
      ./mongodb-linux-i686-2009-07-10/bin/mongod [0x81a723d]
      /lib/tls/i686/cmov/libpthread.so.0 [0xb7dd64fb]
      /lib/tls/i686/cmov/libc.so.6(clone+0x5e) [0xb7d58e5e]
      Sun Jul 12 00:56:49 dbexit:
      Sun Jul 12 00:56:49 closeAllFiles() finished
      Sun Jul 12 00:56:49 dbexit: really exiting now

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            wouter Wouter
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: