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

Reinterpreting script in module mode corrupts the source string data

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL

    Description

      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)

      Attachments

        Activity

          People

            matt.broadstone@mongodb.com Matt Broadstone
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: