[swift-corelibs-dev] Encountering "Constant strings cannot be deallocated" in Linux foundation

Tony Parker anthony.parker at apple.com
Wed Nov 29 15:43:56 CST 2017


Hi Brandon,

This is probably a bug in the CoreFoundation C sources part of swift-corelibs-foundation. Unlike Darwin platforms, we can’t make the CFSTR(“”) macro produce a CFStringRef that cannot be overreleased. Probably there is a constant string returned from CF function, then the Swift runtime assumes it can release it, and bam we wind up with an overrelease.

We’ll have to track down which function is getting called, which probably just requires stepping through that test case with a debugger…

- Tony

> On Nov 29, 2017, at 1:34 PM, Brandon Williams via swift-corelibs-dev <swift-corelibs-dev at swift.org> wrote:
> 
> Hello all!
> 
> We’ve been encountering this runtime error quite a bit recently, and we have no idea why. We’ve filed a bug and there’s one other on JIRA related to this, but both without any comments:
> 
> https://bugs.swift.org/browse/SR-6422 <https://bugs.swift.org/browse/SR-6422>
> https://bugs.swift.org/browse/SR-6398 <https://bugs.swift.org/browse/SR-6398>
> 
> We’re curious if others are aware of this and or has more info? Is it a red herring for some other problem?
> 
> Any info would be helpful!
> _______________________________________________
> swift-corelibs-dev mailing list
> swift-corelibs-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-corelibs-dev/attachments/20171129/c8a8ce3e/attachment.html>


More information about the swift-corelibs-dev mailing list