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

CanonicalQuery::canonicalize can leak a LiteParsedQuery

    XMLWordPrintable

Details

    • 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.

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: