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

some $where queries with $ operator in projection crash server

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.5
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • ALL

      running db.test.find({$where:"return this.a;"},

      {"a.$":1}

      ) will crash the server. Tested on trunk from today. Seems to work fine in 2.4.8 and 2.5.4.

      Relevant log output:
      2013-12-16T11:58:08.061-0500 [conn1] ERROR: Uncaught std::exception: basic_string::_S_construct NULL not valid, terminating
      2013-12-16T11:58:08.061-0500 [conn1] shutdown: going to close listening sockets...
      2013-12-16T11:58:08.061-0500 [conn1] closing listening socket: 9
      2013-12-16T11:58:08.061-0500 [initandlisten] now exiting

        1. server12117.js
          0.2 kB
          Benety Goh

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            andrew.emil@10gen.com Andrew Emil (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: