Commit e9344b082f for openssl.org
commit e9344b082ffa78cb1d68f6446c1b6417c4244a00
Author: Norbert Pocs <norbertp@openssl.org>
Date: Thu Sep 17 17:50:23 2026 +0200
Remove /Gs0 windows compiler flag
/Gs0 forces a __chkstk call into every function prologue. On ARM64 the
compiler copies the MD4 state into registers before the frame is set up,
then loads the __chkstk size argument into x15 while x15 still holds one
of those live values, clobbering it. Without /Gs0 the compiler uses the
default probe threshold (/Gs4096) and emits no __chkstk for small frames,
so the clobber never happens.
Resolves: https://github.com/openssl/openssl/issues/28310
Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Mounir Idrassi <mounir.idrassi@idrix.fr>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Merge-date: Mon Sep 21 10:13:23 2026
Merged-from: https://github.com/openssl/openssl/pull/32872
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
index 9c7261c3f2..3d044e8045 100644
--- a/Configurations/10-main.conf
+++ b/Configurations/10-main.conf
@@ -1498,7 +1498,7 @@ my %targets = (
template => 1,
CFLAGS => add(picker(debug => '/Od',
release => '/O2')),
- cflags => add(picker(default => '/Gs0 /GF /Gy',
+ cflags => add(picker(default => '/GF /Gy',
debug =>
sub {
($disabled{shared} ? "" : ($disabled{"static-vcruntime"} ? "/MDd" : ($disabled{threads} ? "" : "/MTd")));