Swift/C++ interoperability issue in std::string

In scope of one of our project we've faced an issue with constant crashes when integrating C++ library in Swift code using Swift/C++ interoperability.

Investigating the root causes of the issue we've discovered that with new version of Swift bug was introduced.

Long story short: for strings bigger than 27 symbols memory is feed incorrectly that causes the crashes.

By creating this post I wanted to draw community's attention to the problem and promote it to be solved quicker as for now it is not addressed.

Answered by DTS Engineer in 847136022
By creating this post I wanted to draw community's attention to the problem

Realistically, you’re talking to the wrong community here. DevForums is primarily focused on Apple technologies, and this issue is more related to Swift itself. You’ve filed a bug report with the Swift project, which is a good first step. If you want to discuss that, I recommend you bounce over to the Swift Forums. Indeed, it has a a dedicated C++ interoperability topic area.

Finally, as this is open source you could take a stab at investigating it yourself. The Swift folks are always very interested in welcoming new people into the project.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

By creating this post I wanted to draw community's attention to the problem

Realistically, you’re talking to the wrong community here. DevForums is primarily focused on Apple technologies, and this issue is more related to Swift itself. You’ve filed a bug report with the Swift project, which is a good first step. If you want to discuss that, I recommend you bounce over to the Swift Forums. Indeed, it has a a dedicated C++ interoperability topic area.

Finally, as this is open source you could take a stab at investigating it yourself. The Swift folks are always very interested in welcoming new people into the project.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Swift/C++ interoperability issue in std::string
 
 
Q