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

IDLParserContext constructor with only fieldName and predecessor forwards to wrong constructor

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Service Arch
    • Fully Compatible
    • ALL
    • Service Arch 2024-03-04, Service Arch 2024-03-18

      IDLParserContext(StringData, IDLParserContext *) looks like it passes an extra boost::optional argument, which only happens to be valid because the IDLParserContext * can be coerced to a boolean and therefore used for apiStrict in the constructor that does accept two optionals. We should fix this to forward to the correct constructor, ideally by being consistent about the ordering of arguments in the constructors.

      https://github.com/10gen/mongo/blob/e510b35074a82f219028c54da8b8241ae9996b0c/src/mongo/idl/idl_parser.h#L310

            Assignee:
            mathis.bessa@mongodb.com Mathis Bessa (Inactive)
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: