Zebediah Figura (@zfigura) commented about dlls/ntdll/sync.c:
-/***********************************************************************
RtlAcquireSRWLockShared (NTDLL.@)
+/**
- Add a new waiter to the SRWLOCK, and wait on it. The wait will be interrupted
- if the value stored in `lock` changes to something other than `expected`.
- NOTES
- Do not call this function recursively - it will only succeed when
- there are no threads waiting for an exclusive lock!
*/
- Returns TRUE if the lock is acquired, FALSE otherwise.
-void WINAPI RtlAcquireSRWLockShared( RTL_SRWLOCK *lock ) +#ifdef __GNUC__ +__attribute__((force_align_arg_pointer)) +#endif
Even with the current bugs in i686-w64-mingw32 around alignment, I think we shouldn't need this? The WINAPI in the API functions includes force_align_arg_pointer already, and i686-w64-mingw32 should align the stack before calling this function. Are you encountering a situation where gcc isn't properly aligning the waiter structure?