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

CanonicalQuery::canonicalize can leak a LiteParsedQuery

    • Fully Compatible
    • ALL
    • Hide

      Run mongod under a leak detector, and run jstests/core/geo_s2near.js. The last line of that test, which tests a fix for SERVER-13666, issues out-of-bounds legacy coordinates to a spherical near query. This causes uassert 17444 to trigger, raising an exception and leaking the LiteParsedQuery.

      Show
      Run mongod under a leak detector, and run jstests/core/geo_s2near.js. The last line of that test, which tests a fix for SERVER-13666 , issues out-of-bounds legacy coordinates to a spherical near query. This causes uassert 17444 to trigger, raising an exception and leaking the LiteParsedQuery.

      If MatchExpressionParser::parse in the 13 argument form of CanonicalQuery::canonicalize throws an exception (as can occur, for instance, at uassert 17444 in expression_geo.cpp,) then the LiteParsedQuery object returned from LiteParsedQuery::make will be leaked since it is not wrapped in an owning smart pointer.

            Assignee:
            rassi J Rassi
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: