reply to Liu Hao <lh_mouse@12...> - 2017-03-08 03:27:18
I found the original message on this ML. As Kai said, the patch looked
reasonable, but it couldn't be applied because it wasn't generated using
`git format-patch` and the original author's email address was
truncated. So would you please provide a formatted patch (and send it as
an attachment if possible). I could plagiarize the patch but good guys
don't do that. :S
--
Best regards,
LH_Mouse
From 4a86fd92f0fa3322a20e1b6df325e368bfabfaa0 Mon Sep 17 00:00:00 2001
From: Aleksey Vasenev <[email protected]>
Date: Thu, 28 Jul 2016 15:31:06 +0300
Subject: [PATCH] Align thread entry point stack
__attribute__((aligned)) don't work for stack variables in threads created
with _beginthreadex without alignment.
Signed-off-by: Aleksey Vasenev <[email protected]>
---
mingw-w64-libraries/winpthreads/src/thread.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mingw-w64-libraries/winpthreads/src/thread.c
b/mingw-w64-libraries/winpthreads/src/thread.c
index 9c79ac9a..d0970001 100644
--- a/mingw-w64-libraries/winpthreads/src/thread.c
+++ b/mingw-w64-libraries/winpthreads/src/thread.c
@@ -1457,6 +1457,9 @@ pthread_setcanceltype (int type, int *oldtype)
return 0;
}
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
+__attribute__((force_align_arg_pointer))
+#endif
int
pthread_create_wrapper (void *args)
{
--
2.12.0
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public