Race condition in APR_DECLARE_LATE_DLL_FUNC() implementation

2013-12-05 Thread Bert Huijben
Hi, Someone in the Subversion team made our C tests run in parallel. With that our buildbot found a race condition in the Windows specific APR_DECLARE_LATE_DLL_FUNC() implementation. The current code is [[ #define APR_DECLARE_LATE_DLL_FUNC(lib, rettype, calltype, fn, ord, args, names) \

CMake build doesn't define 'WINNT', but apr headers check for it anyway

2013-12-05 Thread Bert Huijben
Hi, On Windows apr_arch_misc.h checks for the 'WINNT' define, which was unconditionally defined on Windows before the CMake build. But now it is no longer defined. This enables some additional dynamic load operations that could fail in some cases (See Race condition in

Re: CMake build doesn't define 'WINNT', but apr headers check for it anyway

2013-12-05 Thread Jeff Trawick
On Thu, Dec 5, 2013 at 9:13 AM, Bert Huijben b...@qqmail.nl wrote: Hi, On Windows apr_arch_misc.h checks for the ‘WINNT’ define, which was unconditionally defined on Windows before the CMake build. But now it is no longer defined. This enables some additional dynamic load

Re: CMake build doesn't define 'WINNT', but apr headers check for it anyway

2013-12-05 Thread Gregg Smith
G. On 12/5/2013 9:23 AM, Gregg Smith wrote: On 12/5/2013 6:48 AM, Jeff Trawick wrote: On Thu, Dec 5, 2013 at 9:13 AM, Bert Huijben b...@qqmail.nl mailto:b...@qqmail.nl wrote: Hi, On Windows apr_arch_misc.h checks for the ‘WINNT’ define, which was unconditionally defined on Windows before

Re: CMake build doesn't define 'WINNT', but apr headers check for it anyway

2013-12-05 Thread William A. Rowe Jr.
On Thu, 05 Dec 2013 09:24:24 -0800 Gregg Smith g...@gknw.net wrote: Once all the 9x stuff is gone, we can drop the define. Precisely. And that would be a version-major/minor change, imho. In the interim, simply -D (ugh... /D it) WINNT. Problem solved. Leave it there for someone to discover

Re: Race condition in APR_DECLARE_LATE_DLL_FUNC() implementation

2013-12-05 Thread William A. Rowe Jr.
On Thu, 5 Dec 2013 15:01:05 +0100 Bert Huijben b...@qqmail.nl wrote: I think the dll load function should be converted to a more stable pattern, that properly handles multiple threads. And perhaps we should just assume a few more NT functions to be alsways there instead of loading them