Re: [swift-users] Is this really a race condition?

2017-03-02 Thread Edward Connell via swift-users
Not at all, thank you for trying it out. When I run my code on the Mac in Xcode with thread sanitizer on, I don't get any warnings or problems at all. I only find problems on Linux. I have noticed that for the same release, the compiler and libraries are not identical between Mac and Linux. I am cu

Re: [swift-users] Is this really a race condition?

2017-03-02 Thread Zhao Xin via swift-users
I am sorry if this bothers you. I just put the original code in Xcode and it works. Anyone knows why this works in Xcode or in macOS? I thought it should show the same warnings as Linux. Zhaoxin On Fri, Mar 3, 2017 at 2:51 AM, Edward Connell via swift-users < swift-users@swift.org> wrote: > Hi G

Re: [swift-users] Is this really a race condition?

2017-03-02 Thread Edward Connell via swift-users
Hi Guillaume, There is still a race condition report, but I think maybe we are almost there. I had to modify your example because it didn't quite build, and a loop to do it twice since it randomly complains if you only do it once. Btw, this is on Linux. The warning is triggered when deinitialize is

Re: [swift-users] Is this really a race condition?

2017-03-01 Thread Edward Connell via swift-users
Ahh! thank you. That makes sense. On Wed, Mar 1, 2017 at 3:29 PM, Guillaume Lessard < gless...@tffenterprises.com> wrote: > > > On Mar 1, 2017, at 3:21 PM, Edward Connell via swift-users < > swift-users@swift.org> wrote: > > > > The thread sanitizer on Linux is reporting that I have race conditio

Re: [swift-users] Is this really a race condition?

2017-03-01 Thread Guillaume Lessard via swift-users
> On Mar 1, 2017, at 3:21 PM, Edward Connell via swift-users > wrote: > > The thread sanitizer on Linux is reporting that I have race conditions in > libswiftcore. I eliminated enough code down to this trivial example. Is there > really a race condition here or are these bogus errors? > >

Re: [swift-users] Is this really a race condition?

2017-03-01 Thread Dave Abrahams via swift-users
on Wed Mar 01 2017, Edward Connell wrote: > The thread sanitizer on Linux is reporting that I have race conditions in > libswiftcore. The only one we currently know about that's actually in libswiftcore is the one addressed by https://github.com/apple/swift/pull/7183 > I eliminated enough cod

[swift-users] Is this really a race condition?

2017-03-01 Thread Edward Connell via swift-users
The thread sanitizer on Linux is reporting that I have race conditions in libswiftcore. I eliminated enough code down to this trivial example. Is there really a race condition here or are these bogus errors? let count = 1000 var items = [[UInt8]?](repeating: nil, count: count) DispatchQueue.concu