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

Reinterpreting script in module mode corrupts the source string data

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

      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@mongodb.com Matt Broadstone
            Reporter:
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: