From: Julian Waters <[email protected]>
At some point gcc started enforcing that __stack_chk_guard must have certain
properties, but unfortunately a side effect seems to be that the compiler
now hits an assert in its Link Time Optimizer, specifically the serializer
when __stack_chk_guard is declared in the code without being explicitly
initialized. We can just initialize it to 0 to make the assert go away.
mingw-w64-crt/ssp/ChangeLog:
* stack_chk_guard.c (__stack_chk_guard): Initialize to 0.
Signed-off-by: TheShermanTanker <[email protected]>
---
mingw-w64-crt/ssp/stack_chk_guard.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mingw-w64-crt/ssp/stack_chk_guard.c
b/mingw-w64-crt/ssp/stack_chk_guard.c
index 9d961e333..499f0033b 100644
--- a/mingw-w64-crt/ssp/stack_chk_guard.c
+++ b/mingw-w64-crt/ssp/stack_chk_guard.c
@@ -8,7 +8,7 @@
#include <stdlib.h>
#include <stdint.h>
-uintptr_t __stack_chk_guard;
+uintptr_t __stack_chk_guard = 0;
#if defined __SSP__ || defined __SSP_STRONG__ || defined __SSP_ALL__
// This function requires `no_stack_protector` because it changes the
--
2.53.0.windows.2
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public