[issue30747] _Py_atomic_* not actually atomic on Windows with MSVC

2017-08-16 Thread Pär Björklund
Pär Björklund added the comment: My guess would be the cast from uintptr_t to intptr_t in the return type. I'll look into this, when possible, should have some time later this week or over the weekend. -- ___ Python tracker <rep...@bugs.python.

[issue30687] build.bat should locate msbuild.exe rather than vcvarsall.bat

2017-06-24 Thread Pär Björklund
Pär Björklund added the comment: This change causes build failures when VS2017 is installed without the C++ tooling as it finds MSBuild belonging to VS2017 but it can't build using it. Microsoft recommends using this tool https://github.com/microsoft/vswhere to find and set up the paths

[issue30747] _Py_atomic_* not actually atomic on Windows with MSVC

2017-06-24 Thread Pär Björklund
New submission from Pär Björklund: _Py_atomic_store and _Py_atomic_load are not implemented as atomic operations on Windows when using Visual Studio to build. This might cause hard to troubleshoot behaviour, especially in third party hosting applications.. -- components: Interpreter

[issue30687] build.bat should locate msbuild.exe rather than vcvarsall.bat

2017-06-24 Thread Pär Björklund
Pär Björklund added the comment: Currently I have VS2017 installed without C++ tooling for .NET development. The C++ tooling breaks other projects I'm working on. I have VS2015 Community update 3 installed with C++ tooling and the latest compatible Windows SDK. Before this patch everything

[issue30747] _Py_atomic_* not actually atomic on Windows with MSVC

2017-06-24 Thread Pär Björklund
Changes by Pär Björklund <per.bjorkl...@gmail.com>: -- pull_requests: +2433 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30747> ___

[issue30687] build.bat should locate msbuild.exe rather than vcvarsall.bat

2017-06-25 Thread Pär Björklund
Pär Björklund added the comment: I don't believe that this is a bug in Visual Studio as MSBuild is used for .NET projects as well it should be available even without the C++ tooling installed. Checking for the targets file seems like a workable solution

[issue30747] _Py_atomic_* not actually atomic on Windows with MSVC

2017-06-25 Thread Pär Björklund
Pär Björklund added the comment: Antoine said it best. It's very hard to prove that this code is correct or incorrect as it requires multiple threads accessing the same variable and very specific timings to produce an actual issue. My PR only solved half of the issue because I didn't really

[issue30747] _Py_atomic_* not actually atomic on Windows with MSVC

2017-06-26 Thread Pär Björklund
Pär Björklund added the comment: Microsoft don't spend much time on the C compiler features, still lacking C99 features so I don't have much hope of getting C11 support anytime soon or at all. One could of course implement a cross platform stdatomic library that matches the C11 spec

[issue30747] _Py_atomic_* not actually atomic on Windows with MSVC

2018-06-14 Thread Pär Björklund
Pär Björklund added the comment: The HLE variants were simply chosen to match the semantics on other platforms with regard to aquire/release. If Intel engineers say the plain versions are better that's good enough for me. It would be interesting seeing some benchmarks but I don't have any idea