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

2017-12-01 Thread Tony Parker via swift-corelibs-dev
This isn’t it, because we always call through to swift_release in CFRelease on 
Linux, because the CFString is a swift type under the hood.

We may be able to change this to check for a CF specific hack of some kind, but 
in the meantime adding the retain works.

PR here:

https://github.com/apple/swift-corelibs-foundation/pull/1351

- Tony

> On Nov 29, 2017, at 8:31 PM, Philippe Hausler  wrote:
> 
> I think that perhaps we have a problem with the retain count flags in the 
> definition of CFSTR. Previously the pinned reference would prevent the 
> deallocation. This may have gotten clobbered with the latest CF import.
> 
> Sent from my iPhone
> 
> On Nov 29, 2017, at 7:55 PM, Brandon Williams via swift-corelibs-dev 
> mailto:swift-corelibs-dev@swift.org>> wrote:
> 
>> Hey Tony,
>> 
>> We were able to fix our crashes by avoiding our uses of `URLQueryItem`s. In 
>> one place I had to completely remove the use of `URLQueryItem`:
>> 
>> https://github.com/pointfreeco/swift-web/pull/79/files#diff-293b73a926ba418bd9511ef735fc947cL147
>>  
>> 
>> 
>> And in another my colleague Stephen Celis discovered that duplicate keys in 
>> a query string can cause this to crash:
>> 
>> https://github.com/pointfreeco/swift-web/pull/80 
>> 
>> 
>> He was able to come up with a minimal test case to demonstrate this:
>> 
>> https://github.com/pointfreeco/swift-web/commit/cfa9b519a829f1c1627620521326f0877c2d023a
>>  
>> 
>> 
>> And you can see the failure in this Travis CI report:
>> 
>> https://travis-ci.org/pointfreeco/swift-web/builds/309316418 
>> 
>> 
>> At the bottom you’ll find:
>> 
>> ```fatal error: Constant strings cannot be deallocated: file 
>> Foundation/NSCFString.swift, line 118```
>> 
>> So definitely seems to be in that area!
>> 
>> Now, as far as rebuilding swift-corelibs-foundation, I’m down to try but I 
>> dont really know much about how to do that. With some instructions I could 
>> give it a shot.
>> 
>> Thanks for the help!
>> 
>> 
>> 
>> 
>> On Wed, Nov 29, 2017 at 5:59 PM Tony Parker > > wrote:
>> I see a couple of places that are suspicious there:
>> 
>> Description:
>> 
>> https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L66
>>  
>> 
>> 
>> And the nameString / valueString constants in the copy query items function:
>> 
>> https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L1057
>>  
>> 
>> https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L1079
>>  
>> 
>> https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L1104
>>  
>> 
>> https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L1134
>>  
>> 
>> https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L1158
>>  
>> 
>> 
>> Do you have the ability to re-build swift-corelibs-foundation and run a 
>> test? I suspect if you replace those with CFRetain(CFSTR(…)) then it will 
>> fix your crash.
>> 
>> - Tony
>> 
>> 
>>> On Nov 29, 2017, at 2:06 PM, Brandon Williams >> > wrote:
>>> 
>>> Thanks for the info!
>>> 
>>> FWIW, most of the places I have encountered this so far have made use of 
>>> `URLComponents`, and have even been able to eliminate the crash by getting 
>>> rid of that code in a few places. The other JIRA bug on this topic also 
>>> mentions URLComponents in their repro case. Seems to be the culprit.
>>> 
>>> Also worth noting that in the above cases dealing with URLComponents the 
>>> crash only happens in DEBUG compilations, not RELEASE.
>>> 
>>> However, I do have another one of these crashes that _does_ happen on 
>>> RELEASE builds that I haven’t yet been able to reduce.
>>> 
>>> 
>>> On Wed, Nov 29, 2017 at 4:43 PM Tony Parker >> 

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

2017-11-29 Thread Philippe Hausler via swift-corelibs-dev
I think that perhaps we have a problem with the retain count flags in the 
definition of CFSTR. Previously the pinned reference would prevent the 
deallocation. This may have gotten clobbered with the latest CF import.

Sent from my iPhone

> On Nov 29, 2017, at 7:55 PM, Brandon Williams via swift-corelibs-dev 
>  wrote:
> 
> Hey Tony,
> 
> We were able to fix our crashes by avoiding our uses of `URLQueryItem`s. In 
> one place I had to completely remove the use of `URLQueryItem`:
> 
> https://github.com/pointfreeco/swift-web/pull/79/files#diff-293b73a926ba418bd9511ef735fc947cL147
> 
> And in another my colleague Stephen Celis discovered that duplicate keys in a 
> query string can cause this to crash:
> 
> https://github.com/pointfreeco/swift-web/pull/80
> 
> He was able to come up with a minimal test case to demonstrate this:
> 
> https://github.com/pointfreeco/swift-web/commit/cfa9b519a829f1c1627620521326f0877c2d023a
> 
> And you can see the failure in this Travis CI report:
> 
> https://travis-ci.org/pointfreeco/swift-web/builds/309316418
> 
> At the bottom you’ll find:
> 
> ```fatal error: Constant strings cannot be deallocated: file 
> Foundation/NSCFString.swift, line 118```
> 
> So definitely seems to be in that area!
> 
> Now, as far as rebuilding swift-corelibs-foundation, I’m down to try but I 
> dont really know much about how to do that. With some instructions I could 
> give it a shot.
> 
> Thanks for the help!
> 
> 
> 
> 
>> On Wed, Nov 29, 2017 at 5:59 PM Tony Parker  wrote:
>> I see a couple of places that are suspicious there:
>> 
>> Description:
>> 
>> https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L66
>> 
>> And the nameString / valueString constants in the copy query items function:
>> 
>> https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L1057
>> https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L1079
>> https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L1104
>> https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L1134
>> https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L1158
>> 
>> Do you have the ability to re-build swift-corelibs-foundation and run a 
>> test? I suspect if you replace those with CFRetain(CFSTR(…)) then it will 
>> fix your crash.
>> 
>> - Tony
>> 
>> 
>>> On Nov 29, 2017, at 2:06 PM, Brandon Williams  wrote:
>>> 
>>> Thanks for the info!
>>> 
>>> FWIW, most of the places I have encountered this so far have made use of 
>>> `URLComponents`, and have even been able to eliminate the crash by getting 
>>> rid of that code in a few places. The other JIRA bug on this topic also 
>>> mentions URLComponents in their repro case. Seems to be the culprit.
>>> 
>>> Also worth noting that in the above cases dealing with URLComponents the 
>>> crash only happens in DEBUG compilations, not RELEASE.
>>> 
>>> However, I do have another one of these crashes that _does_ happen on 
>>> RELEASE builds that I haven’t yet been able to reduce.
>>> 
>>> 
 On Wed, Nov 29, 2017 at 4:43 PM Tony Parker  
 wrote:
 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 
>  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-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@swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
>> 
> ___
> swift-corelibs-dev mailing list
> swift-corelibs-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swif

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

2017-11-29 Thread Brandon Williams via swift-corelibs-dev
Hey Tony,

We were able to fix our crashes by avoiding our uses of `URLQueryItem`s. In
one place I had to completely remove the use of `URLQueryItem`:

https://github.com/pointfreeco/swift-web/pull/79/files#diff-293b73a926ba418bd9511ef735fc947cL147

And in another my colleague Stephen Celis discovered that duplicate keys in
a query string can cause this to crash:

https://github.com/pointfreeco/swift-web/pull/80

He was able to come up with a minimal test case to demonstrate this:

https://github.com/pointfreeco/swift-web/commit/cfa9b519a829f1c1627620521326f0877c2d023a

And you can see the failure in this Travis CI report:

https://travis-ci.org/pointfreeco/swift-web/builds/309316418


At the bottom you’ll find:

```fatal error: Constant strings cannot be deallocated: file
Foundation/NSCFString.swift, line 118```

So definitely seems to be in that area!

Now, as far as rebuilding swift-corelibs-foundation, I’m down to try but I
dont really know much about how to do that. With some instructions I could
give it a shot.

Thanks for the help!




On Wed, Nov 29, 2017 at 5:59 PM Tony Parker 
wrote:

> I see a couple of places that are suspicious there:
>
> Description:
>
>
> https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L66
>
> And the nameString / valueString constants in the copy query items
> function:
>
>
> https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L1057
>
> https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L1079
>
> https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L1104
>
> https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L1134
>
> https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L1158
>
> Do you have the ability to re-build swift-corelibs-foundation and run a
> test? I suspect if you replace those with CFRetain(CFSTR(…)) then it will
> fix your crash.
>
> - Tony
>
>
> On Nov 29, 2017, at 2:06 PM, Brandon Williams  wrote:
>
> Thanks for the info!
>
> FWIW, most of the places I have encountered this so far have made use of
> `URLComponents`, and have even been able to eliminate the crash by getting
> rid of that code in a few places. The other JIRA bug on this topic also
> mentions URLComponents in their repro case. Seems to be the culprit.
>
> Also worth noting that in the above cases dealing with URLComponents the
> crash only happens in DEBUG compilations, not RELEASE.
>
> However, I do have another one of these crashes that _does_ happen on
> RELEASE builds that I haven’t yet been able to reduce.
>
>
> On Wed, Nov 29, 2017 at 4:43 PM Tony Parker 
> wrote:
>
>> 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@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-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@swift.org
>> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
>>
>>
>
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


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

2017-11-29 Thread Tony Parker via swift-corelibs-dev
I see a couple of places that are suspicious there:

Description:

https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L66
 


And the nameString / valueString constants in the copy query items function:

https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L1057
 

https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L1079
 

https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L1104
 

https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L1134
 

https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L1158
 


Do you have the ability to re-build swift-corelibs-foundation and run a test? I 
suspect if you replace those with CFRetain(CFSTR(…)) then it will fix your 
crash.

- Tony

> On Nov 29, 2017, at 2:06 PM, Brandon Williams  wrote:
> 
> Thanks for the info!
> 
> FWIW, most of the places I have encountered this so far have made use of 
> `URLComponents`, and have even been able to eliminate the crash by getting 
> rid of that code in a few places. The other JIRA bug on this topic also 
> mentions URLComponents in their repro case. Seems to be the culprit.
> 
> Also worth noting that in the above cases dealing with URLComponents the 
> crash only happens in DEBUG compilations, not RELEASE.
> 
> However, I do have another one of these crashes that _does_ happen on RELEASE 
> builds that I haven’t yet been able to reduce.
> 
> 
> On Wed, Nov 29, 2017 at 4:43 PM Tony Parker  > wrote:
> 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 
>> mailto:swift-corelibs-dev@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-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@swift.org 
>> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev 
>> 

___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


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

2017-11-29 Thread Brandon Williams via swift-corelibs-dev
Thanks for the info!

FWIW, most of the places I have encountered this so far have made use of
`URLComponents`, and have even been able to eliminate the crash by getting
rid of that code in a few places. The other JIRA bug on this topic also
mentions URLComponents in their repro case. Seems to be the culprit.

Also worth noting that in the above cases dealing with URLComponents the
crash only happens in DEBUG compilations, not RELEASE.

However, I do have another one of these crashes that _does_ happen on
RELEASE builds that I haven’t yet been able to reduce.


On Wed, Nov 29, 2017 at 4:43 PM Tony Parker 
wrote:

> 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@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-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@swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
>
>
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


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

2017-11-29 Thread Tony Parker via swift-corelibs-dev
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 
>  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-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@swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev

___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


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

2017-11-29 Thread Brandon Williams via swift-corelibs-dev
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-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@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] Encountering "Constant strings cannot be deallocated"

2017-11-17 Thread Alex Blewitt via swift-corelibs-dev
Thanks!

Alex

> On 17 Nov 2017, at 17:27, Brandon Williams  wrote:
> 
> I haven’t been able to find a minimal test case, but at least the test case I 
> linked to reproduces every time.
> 
> I’m not sure I’ll have time to search for a minimal case today, and I leave 
> for vacation tomorrow :/ perhaps when I get back.
> 
> I did at least file the bug report: https://bugs.swift.org/browse/SR-6422 
> 
> On Fri, Nov 17, 2017 at 4:48 AM Alex Blewitt  > wrote:
> Can you file a bug at bugs.swift.org  with a minimal 
> test case? It certainly sounds like a bug, and from the looks of the docker 
> files, you're using the swift 4.0.2 release on Ubuntu 16.04.
> 
> If you can run the test under LLDB and put a breakpoint in that function, and 
> get a backtrace (with 'bt') then it might be interesting to see where the 
> deinit is being triggered, and give some kind of clue as to what is happening.
> 
> Alex
> 
> 
>> On 16 Nov 2017, at 22:46, Brandon Williams via swift-corelibs-dev 
>> mailto:swift-corelibs-dev@swift.org>> wrote:
>> 
>> Oops, sorry, hit send too early!
>> 
>> The docker file Im using can be seen here:
>> 
>> https://github.com/pointfreeco/swift-web/blob/bb-travis/Dockerfile 
>> 
>> 
>> Which is this template:
>> 
>> https://github.com/swiftdocker/docker-swift/blob/5c83628d4696bca62aec3136a4ee9b854e8d548e/4.0/Dockerfile
>>  
>> 
>> 
>> So not using any of the betas...
>> 
>> On Thu, Nov 16, 2017 at 5:45 PM Brandon Williams > > wrote:
>> Ah, sorry for now providing more info!
>> 
>> So the docker file that I am using to run the tests can be see here:
>> 
>> 
>> 
>> On Thu, Nov 16, 2017 at 5:43 PM Philippe Hausler > > wrote:
>> Is this with a recent build? Do you know what commit the 
>> swift-corelibs-foundation is from? That might help nail down what is going 
>> on here.
>> 
>> 
>>> On Nov 16, 2017, at 2:41 PM, Brandon Williams via swift-corelibs-dev 
>>> mailto:swift-corelibs-dev@swift.org>> wrote:
>>> 
>> 
>>> 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 quite isolate 
>>> it, but I thought perhaps someone here might know how that could path could 
>>> even be executed.
>>> 
>>> Thanks for any help!
>> 
>>> ___
>>> swift-corelibs-dev mailing list
>>> swift-corelibs-dev@swift.org 
>>> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev 
>>> 
>> ___
>> swift-corelibs-dev mailing list
>> swift-corelibs-dev@swift.org 
>> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev 
>> 
> 

___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] Encountering "Constant strings cannot be deallocated"

2017-11-17 Thread Brandon Williams via swift-corelibs-dev
I haven’t been able to find a minimal test case, but at least the test case
I linked to reproduces every time.

I’m not sure I’ll have time to search for a minimal case today, and I leave
for vacation tomorrow :/ perhaps when I get back.

I did at least file the bug report: https://bugs.swift.org/browse/SR-6422

On Fri, Nov 17, 2017 at 4:48 AM Alex Blewitt  wrote:

> Can you file a bug at bugs.swift.org with a minimal test case? It
> certainly sounds like a bug, and from the looks of the docker files, you're
> using the swift 4.0.2 release on Ubuntu 16.04.
>
> If you can run the test under LLDB and put a breakpoint in that function,
> and get a backtrace (with 'bt') then it might be interesting to see where
> the deinit is being triggered, and give some kind of clue as to what is
> happening.
>
> Alex
>
>
> On 16 Nov 2017, at 22:46, Brandon Williams via swift-corelibs-dev <
> swift-corelibs-dev@swift.org> wrote:
>
> Oops, sorry, hit send too early!
>
> The docker file Im using can be seen here:
>
> https://github.com/pointfreeco/swift-web/blob/bb-travis/Dockerfile
>
> Which is this template:
>
>
> https://github.com/swiftdocker/docker-swift/blob/5c83628d4696bca62aec3136a4ee9b854e8d548e/4.0/Dockerfile
>
> So not using any of the betas...
>
> On Thu, Nov 16, 2017 at 5:45 PM Brandon Williams  wrote:
>
>> Ah, sorry for now providing more info!
>>
>> So the docker file that I am using to run the tests can be see here:
>>
>>
>>
>> On Thu, Nov 16, 2017 at 5:43 PM Philippe Hausler 
>> wrote:
>>
>>> Is this with a recent build? Do you know what commit the
>>> swift-corelibs-foundation is from? That might help nail down what is going
>>> on here.
>>>
>>> On Nov 16, 2017, at 2:41 PM, Brandon Williams via swift-corelibs-dev <
>>> swift-corelibs-dev@swift.org> wrote:
>>>
>>> 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 quite
>>> isolate it, but I thought perhaps someone here might know how that could
>>> path could even be executed.
>>>
>>> Thanks for any help!
>>>
>>> ___
>>> swift-corelibs-dev mailing list
>>> swift-corelibs-dev@swift.org
>>> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
>>>
>>> ___
> swift-corelibs-dev mailing list
> swift-corelibs-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
>
>
>
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] Encountering "Constant strings cannot be deallocated"

2017-11-17 Thread Alex Blewitt via swift-corelibs-dev
Can you file a bug at bugs.swift.org  with a minimal 
test case? It certainly sounds like a bug, and from the looks of the docker 
files, you're using the swift 4.0.2 release on Ubuntu 16.04.

If you can run the test under LLDB and put a breakpoint in that function, and 
get a backtrace (with 'bt') then it might be interesting to see where the 
deinit is being triggered, and give some kind of clue as to what is happening.

Alex

> On 16 Nov 2017, at 22:46, Brandon Williams via swift-corelibs-dev 
>  wrote:
> 
> Oops, sorry, hit send too early!
> 
> The docker file Im using can be seen here:
> 
> https://github.com/pointfreeco/swift-web/blob/bb-travis/Dockerfile 
> 
> 
> Which is this template:
> 
> https://github.com/swiftdocker/docker-swift/blob/5c83628d4696bca62aec3136a4ee9b854e8d548e/4.0/Dockerfile
>  
> 
> 
> So not using any of the betas...
> 
> On Thu, Nov 16, 2017 at 5:45 PM Brandon Williams  > wrote:
> Ah, sorry for now providing more info!
> 
> So the docker file that I am using to run the tests can be see here:
> 
> 
> 
> On Thu, Nov 16, 2017 at 5:43 PM Philippe Hausler  > wrote:
> Is this with a recent build? Do you know what commit the 
> swift-corelibs-foundation is from? That might help nail down what is going on 
> here.
> 
> 
>> On Nov 16, 2017, at 2:41 PM, Brandon Williams via swift-corelibs-dev 
>> mailto:swift-corelibs-dev@swift.org>> wrote:
>> 
> 
>> 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 quite isolate 
>> it, but I thought perhaps someone here might know how that could path could 
>> even be executed.
>> 
>> Thanks for any help!
> 
>> ___
>> swift-corelibs-dev mailing list
>> swift-corelibs-dev@swift.org 
>> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev 
>> 
> ___
> swift-corelibs-dev mailing list
> swift-corelibs-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev

___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] Encountering "Constant strings cannot be deallocated"

2017-11-16 Thread Brandon Williams via swift-corelibs-dev
Oops, sorry, hit send too early!

The docker file Im using can be seen here:

https://github.com/pointfreeco/swift-web/blob/bb-travis/Dockerfile

Which is this template:

https://github.com/swiftdocker/docker-swift/blob/5c83628d4696bca62aec3136a4ee9b854e8d548e/4.0/Dockerfile

So not using any of the betas...

On Thu, Nov 16, 2017 at 5:45 PM Brandon Williams  wrote:

> Ah, sorry for now providing more info!
>
> So the docker file that I am using to run the tests can be see here:
>
>
>
> On Thu, Nov 16, 2017 at 5:43 PM Philippe Hausler 
> wrote:
>
>> Is this with a recent build? Do you know what commit the
>> swift-corelibs-foundation is from? That might help nail down what is going
>> on here.
>>
>> On Nov 16, 2017, at 2:41 PM, Brandon Williams via swift-corelibs-dev <
>> swift-corelibs-dev@swift.org> wrote:
>>
>> 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 quite
>> isolate it, but I thought perhaps someone here might know how that could
>> path could even be executed.
>>
>> Thanks for any help!
>>
>> ___
>> swift-corelibs-dev mailing list
>> swift-corelibs-dev@swift.org
>> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
>>
>>
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] Encountering "Constant strings cannot be deallocated"

2017-11-16 Thread Brandon Williams via swift-corelibs-dev
Ah, sorry for now providing more info!

So the docker file that I am using to run the tests can be see here:



On Thu, Nov 16, 2017 at 5:43 PM Philippe Hausler  wrote:

> Is this with a recent build? Do you know what commit the
> swift-corelibs-foundation is from? That might help nail down what is going
> on here.
>
> On Nov 16, 2017, at 2:41 PM, Brandon Williams via swift-corelibs-dev <
> swift-corelibs-dev@swift.org> wrote:
>
> 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 quite isolate
> it, but I thought perhaps someone here might know how that could path could
> even be executed.
>
> Thanks for any help!
>
> ___
> swift-corelibs-dev mailing list
> swift-corelibs-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
>
>
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] Encountering "Constant strings cannot be deallocated"

2017-11-16 Thread Philippe Hausler via swift-corelibs-dev
Is this with a recent build? Do you know what commit the 
swift-corelibs-foundation is from? That might help nail down what is going on 
here.

> On Nov 16, 2017, at 2:41 PM, Brandon Williams via swift-corelibs-dev 
>  wrote:
> 
> 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 quite isolate 
> it, but I thought perhaps someone here might know how that could path could 
> even be executed.
> 
> Thanks for any help!
> ___
> swift-corelibs-dev mailing list
> swift-corelibs-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev

___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


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

2017-11-16 Thread Brandon Williams via swift-corelibs-dev
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 quite isolate
it, but I thought perhaps someone here might know how that could path could
even be executed.

Thanks for any help!
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev