Reinterpreting script in module mode corrupts the source string data

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      An optimization introduced in SERVER-70553 attempts avoid re-reading a file from disk if we need to reinterpret the source as a module. Since the code stores the data in a standard JSString, it will corrupt the input UTF8 data and prevent accurate round-tripping of some characters. The fix is to store the data in a wide UCString (similar to how we store it when reading from the file in the ModuleLoader::fileAsString method)

            Assignee:
            Matt Broadstone
            Reporter:
            Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: