Skip to content

Commit

Permalink
8.6.0_6 fix LibreSSL 3.8.3/3.9.0 crash on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Mar 12, 2024
1 parent 65b5e0a commit acd332f
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export CURL_HASH=3ccd55d91af9516539df80625f818c734dc6f2ecf9bada33c76765e99121db1
# Create revision string
# NOTE: Set _REV to 1 after bumping CURL_VER_, then increment for each
# CI rebuild via `main` branch push (e.g. after bumping a dependency).
export _REV="${CW_REVISION:-5}"
export _REV="${CW_REVISION:-6}"

export TRURL_VER_='0.10'
export TRURL_HASH=e54ee05a1a39f2547fbb39225f9cf5e2608eeaf07ad3f7dbff0a069d060d3c46
Expand Down
2 changes: 2 additions & 0 deletions libressl-pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# SPDX-License-Identifier: MIT

# Caveats (as of 3.9.0):
# - crash on startup after 3.8.3, with mingw-w64 x64 with ASM and CET enabled.
# https://github.com/libressl/portable/issues/1015
# - CMake builds override -NDEBUG and do not allow building with this option. [FIX MERGED THEN LOST] https://github.com/libressl/portable/pull/988
# - ASM support only for x64.
# - Not possible to hide most ASM symbols from shared lib exports in Linux, macOS.
Expand Down
1 change: 1 addition & 0 deletions libressl.dev.patch
135 changes: 135 additions & 0 deletions libressl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
diff -u -r a/crypto/aes/aes-mingw64-x86_64.S b/crypto/aes/aes-mingw64-x86_64.S
--- a/crypto/aes/aes-mingw64-x86_64.S
+++ b/crypto/aes/aes-mingw64-x86_64.S
@@ -1,4 +1,4 @@
-#if defined(__CET__)
+#if defined(__CET__) && !defined(__MINGW32__)
#include <cet.h>
#else
#define _CET_ENDBR
diff -u -r a/crypto/aes/aesni-mingw64-x86_64.S b/crypto/aes/aesni-mingw64-x86_64.S
--- a/crypto/aes/aesni-mingw64-x86_64.S
+++ b/crypto/aes/aesni-mingw64-x86_64.S
@@ -1,4 +1,4 @@
-#if defined(__CET__)
+#if defined(__CET__) && !defined(__MINGW32__)
#include <cet.h>
#else
#define _CET_ENDBR
diff -u -r a/crypto/aes/aesni-sha1-mingw64-x86_64.S b/crypto/aes/aesni-sha1-mingw64-x86_64.S
--- a/crypto/aes/aesni-sha1-mingw64-x86_64.S
+++ b/crypto/aes/aesni-sha1-mingw64-x86_64.S
@@ -1,4 +1,4 @@
-#if defined(__CET__)
+#if defined(__CET__) && !defined(__MINGW32__)
#include <cet.h>
#else
#define _CET_ENDBR
diff -u -r a/crypto/aes/bsaes-mingw64-x86_64.S b/crypto/aes/bsaes-mingw64-x86_64.S
--- a/crypto/aes/bsaes-mingw64-x86_64.S
+++ b/crypto/aes/bsaes-mingw64-x86_64.S
@@ -1,4 +1,4 @@
-#if defined(__CET__)
+#if defined(__CET__) && !defined(__MINGW32__)
#include <cet.h>
#else
#define _CET_ENDBR
diff -u -r a/crypto/aes/vpaes-mingw64-x86_64.S b/crypto/aes/vpaes-mingw64-x86_64.S
--- a/crypto/aes/vpaes-mingw64-x86_64.S
+++ b/crypto/aes/vpaes-mingw64-x86_64.S
@@ -1,4 +1,4 @@
-#if defined(__CET__)
+#if defined(__CET__) && !defined(__MINGW32__)
#include <cet.h>
#else
#define _CET_ENDBR
diff -u -r a/crypto/camellia/cmll-mingw64-x86_64.S b/crypto/camellia/cmll-mingw64-x86_64.S
--- a/crypto/camellia/cmll-mingw64-x86_64.S
+++ b/crypto/camellia/cmll-mingw64-x86_64.S
@@ -1,4 +1,4 @@
-#if defined(__CET__)
+#if defined(__CET__) && !defined(__MINGW32__)
#include <cet.h>
#else
#define _CET_ENDBR
diff -u -r a/crypto/cpuid-mingw64-x86_64.S b/crypto/cpuid-mingw64-x86_64.S
--- a/crypto/cpuid-mingw64-x86_64.S
+++ b/crypto/cpuid-mingw64-x86_64.S
@@ -1,4 +1,4 @@
-#if defined(__CET__)
+#if defined(__CET__) && !defined(__MINGW32__)
#include <cet.h>
#else
#define _CET_ENDBR
diff -u -r a/crypto/md5/md5-mingw64-x86_64.S b/crypto/md5/md5-mingw64-x86_64.S
--- a/crypto/md5/md5-mingw64-x86_64.S
+++ b/crypto/md5/md5-mingw64-x86_64.S
@@ -1,4 +1,4 @@
-#if defined(__CET__)
+#if defined(__CET__) && !defined(__MINGW32__)
#include <cet.h>
#else
#define _CET_ENDBR
diff -u -r a/crypto/modes/ghash-mingw64-x86_64.S b/crypto/modes/ghash-mingw64-x86_64.S
--- a/crypto/modes/ghash-mingw64-x86_64.S
+++ b/crypto/modes/ghash-mingw64-x86_64.S
@@ -1,4 +1,4 @@
-#if defined(__CET__)
+#if defined(__CET__) && !defined(__MINGW32__)
#include <cet.h>
#else
#define _CET_ENDBR
diff -u -r a/crypto/rc4/rc4-md5-mingw64-x86_64.S b/crypto/rc4/rc4-md5-mingw64-x86_64.S
--- a/crypto/rc4/rc4-md5-mingw64-x86_64.S
+++ b/crypto/rc4/rc4-md5-mingw64-x86_64.S
@@ -1,4 +1,4 @@
-#if defined(__CET__)
+#if defined(__CET__) && !defined(__MINGW32__)
#include <cet.h>
#else
#define _CET_ENDBR
diff -u -r a/crypto/rc4/rc4-mingw64-x86_64.S b/crypto/rc4/rc4-mingw64-x86_64.S
--- a/crypto/rc4/rc4-mingw64-x86_64.S
+++ b/crypto/rc4/rc4-mingw64-x86_64.S
@@ -1,4 +1,4 @@
-#if defined(__CET__)
+#if defined(__CET__) && !defined(__MINGW32__)
#include <cet.h>
#else
#define _CET_ENDBR
diff -u -r a/crypto/sha/sha1-mingw64-x86_64.S b/crypto/sha/sha1-mingw64-x86_64.S
--- a/crypto/sha/sha1-mingw64-x86_64.S
+++ b/crypto/sha/sha1-mingw64-x86_64.S
@@ -1,4 +1,4 @@
-#if defined(__CET__)
+#if defined(__CET__) && !defined(__MINGW32__)
#include <cet.h>
#else
#define _CET_ENDBR
diff -u -r a/crypto/sha/sha256-mingw64-x86_64.S b/crypto/sha/sha256-mingw64-x86_64.S
--- a/crypto/sha/sha256-mingw64-x86_64.S
+++ b/crypto/sha/sha256-mingw64-x86_64.S
@@ -1,4 +1,4 @@
-#if defined(__CET__)
+#if defined(__CET__) && !defined(__MINGW32__)
#include <cet.h>
#else
#define _CET_ENDBR
diff -u -r a/crypto/sha/sha512-mingw64-x86_64.S b/crypto/sha/sha512-mingw64-x86_64.S
--- a/crypto/sha/sha512-mingw64-x86_64.S
+++ b/crypto/sha/sha512-mingw64-x86_64.S
@@ -1,4 +1,4 @@
-#if defined(__CET__)
+#if defined(__CET__) && !defined(__MINGW32__)
#include <cet.h>
#else
#define _CET_ENDBR
diff -u -r a/crypto/whrlpool/wp-mingw64-x86_64.S b/crypto/whrlpool/wp-mingw64-x86_64.S
--- a/crypto/whrlpool/wp-mingw64-x86_64.S
+++ b/crypto/whrlpool/wp-mingw64-x86_64.S
@@ -1,4 +1,4 @@
-#if defined(__CET__)
+#if defined(__CET__) && !defined(__MINGW32__)
#include <cet.h>
#else
#define _CET_ENDBR
1 change: 1 addition & 0 deletions libressl.test.patch

0 comments on commit acd332f

Please sign in to comment.