Uploaded image for project: 'Swift Driver'
  1. Swift Driver
  2. SWIFT-779

Investigate issue with 5.2 release mode C interop

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0
    • Component/s: None
    • Labels:
      None

      Description

      Running the following code in Swift 5.2 release mode triggers a segfault:

      let doc: Document = ["a": [1]]
      

      The issue occurs when we call bson_append_array. It seems that on the border of Swift and C the data in the temporary document representing the array gets garbled. This may be related to inlining.

      Debugging via lldb and Xcode has not yielded any answers, so we should create a minimal example and post on the forums to see if anyone who works on the Swift compiler knows what the issue might be.

        Attachments

          Activity

            People

            Assignee:
            kaitlin.mahar Kaitlin Mahar
            Reporter:
            kaitlin.mahar Kaitlin Mahar
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: