Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-6422] Encountering "Constant strings cannot be deallocated" in Linux foundation #3785

Closed
mbrandonw opened this issue Nov 17, 2017 · 2 comments

Comments

@mbrandonw
Copy link

Previous ID SR-6422
Radar None
Original Reporter @mbrandonw
Type Bug
Status Resolved
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug, RunTimeCrash
Assignee None
Priority Medium

md5: 591e29ee8530d7b357e7037d4dee4824

duplicates:

  • SR-6398 Constant strings cannot be deallocated: file Foundation/NSCFString.swift, line 118

Issue Description:

Hello! I have a test case that when run on Linux somehow encounters the "Constant strings cannot be deallocated” fatal error thrown in NSCFString.swift, as seen here:

https://github.com/apple/swift-corelibs-foundation/blob/master/Foundation/NSCFString.swift#L118

The test that does it is here:

https://github.com/pointfreeco/swift-web/blob/5f19a0264be5d369ee0438da8599e3c478a6573b/Tests/ApplicativeRouterTests/SyntaxRouterTests.swift#L88-L93

Now there’s a lot to unravel here and I haven’t been able to find a minimal test case yet, but I thought I would at least file this for now and can update if I find the minimal test case.

I have also raised this issue not he corelibs-dev mailing list:

https://lists.swift.org/pipermail/swift-corelibs-dev/Week-of-Mon-20171113/001351.html

Thanks!

@mbrandonw
Copy link
Author

Hello! After some investigation we were able to find that most of these crashes have something to do with `URLQueryItem`s. In fact, it seems that it has to do with duplicate keys in a query string, as demonstrated here:

pointfreeco/swift-web@cfa9b51

You can see the failure on this Travis CI output:

https://travis-ci.org/pointfreeco/swift-web/builds/309316418?utm_source=email&utm_medium=notification

At the bottom we have:
fatal error: Constant strings cannot be deallocated: file Foundation/NSCFString.swift, line 118

@parkera
Copy link
Member

parkera commented Dec 1, 2017

I think we've tracked this down. We'll fix with SR-6398.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants