IDLParserContext constructor with only fieldName and predecessor forwards to wrong constructor

XMLWordPrintableJSON

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

      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 (Inactive)
            Reporter:
            Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: