[openssl/openssl] b39133: async_posix.h: remove unreachable OPENSSL_SYS_TANDEM

0 views
Skip to first unread message

Milan Broz

unread,
May 7, 2026, 4:14:38 PM (2 days ago) May 7
to openssl...@openssl.org
Branch: refs/heads/master
Home: https://github.com/openssl/openssl
Commit: b391338239f2c3d46e5e9a83f08f4ec6e57fcd70
https://github.com/openssl/openssl/commit/b391338239f2c3d46e5e9a83f08f4ec6e57fcd70
Author: Milan Broz <gmaz...@gmail.com>
Date: 2026-05-07 (Thu, 07 May 2026)

Changed paths:
M crypto/async/async_local.h

Log Message:
-----------
async_posix.h: remove unreachable OPENSSL_SYS_TANDEM

The top-level #if requires !defined(OPENSSL_SYS_TANDEM):

#if defined(OPENSSL_SYS_UNIX) \
&& defined(OPENSSL_THREADS) && !defined(OPENSSL_NO_ASYNC) \
&& !defined(__ANDROID__) && !defined(__OpenBSD__) \
&& !defined(OPENSSL_SYS_TANDEM)

so the nested

#if defined(OPENSSL_SYS_TANDEM)
#include <tdmsig.h>
#else
#include <ucontext.h>
#endif

can never select the OPENSSL_SYS_TANDEM condition.

According to discussion on the issue 31074, removal of the second
(unreachable) condition is the way to go.

Fixes #31074

Co-Authored-By: Claude Opus 4.7 <nor...@anthropic.com>

Reviewed-by: Saša Nedvědický <sas...@openssl.org>
Reviewed-by: Eugene Syromiatnikov <es...@openssl.org>
Reviewed-by: Neil Horman <nho...@openssl.org>
MergeDate: Thu May 7 20:11:08 2026
(Merged from https://github.com/openssl/openssl/pull/31076)


Commit: 8488abc84a46dcecd4ea352f218c9aaee6f6e13f
https://github.com/openssl/openssl/commit/8488abc84a46dcecd4ea352f218c9aaee6f6e13f
Author: Milan Broz <gmaz...@gmail.com>
Date: 2026-05-07 (Thu, 07 May 2026)

Changed paths:
M crypto/bn/bn_nist.c

Log Message:
-----------
bn_nist.c: remove unreachable BN_BITS2 == 64

The block in BN_nist_mod_224() is gated by

#if defined(NIST_INT64) && BN_BITS2 != 64

so the #if

#if BN_BITS2 == 64
rp[7] = carry;
#endif

is unreachable. Remove it.

The code is actualy relic of an earlier design where the NIST_INT64
accumulator path was meant 64-bit too.

Disabling 64-bit path above with BN_BITS2 != 64 resulted in
#if BN_BITS2 == 64 was left unreachable

The outer condition is correct, it is meant to be 32bit only,
otherwise it would need to introduce load_u32/store_lo32 as in other
functions to avoid clang strict-aliasing optimizer issues.

Co-Authored-By: Claude Opus 4.7 <nor...@anthropic.com>

Reviewed-by: Saša Nedvědický <sas...@openssl.org>
Reviewed-by: Eugene Syromiatnikov <es...@openssl.org>
Reviewed-by: Neil Horman <nho...@openssl.org>
MergeDate: Thu May 7 20:11:12 2026
(Merged from https://github.com/openssl/openssl/pull/31076)


Commit: a3d87506b75c7b647da0c0c3e709d2f870397567
https://github.com/openssl/openssl/commit/a3d87506b75c7b647da0c0c3e709d2f870397567
Author: Milan Broz <gmaz...@gmail.com>
Date: 2026-05-07 (Thu, 07 May 2026)

Changed paths:
M crypto/ui/ui_openssl.c

Log Message:
-----------
ui_openssl.c: remove unreachable _WIN32

noecho_fgets() is enclosed by

#if defined(OPENSSL_SYS_MSDOS) && !defined(_WIN32)

The inner #if defined(_WIN32) is unreachable

#if defined(_WIN32)
i = _getch();
#else
i = getch();
#endif

Remove it.

Verified by cross compilation under DJGPP which is AFAIK the only
MSDOS/non-WIN32 environment we can use.

Co-Authored-By: Claude Opus 4.7 <nor...@anthropic.com>

Reviewed-by: Saša Nedvědický <sas...@openssl.org>
Reviewed-by: Eugene Syromiatnikov <es...@openssl.org>
Reviewed-by: Neil Horman <nho...@openssl.org>
MergeDate: Thu May 7 20:11:18 2026
(Merged from https://github.com/openssl/openssl/pull/31076)


Compare: https://github.com/openssl/openssl/compare/2d349da141dd...a3d87506b75c

To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications
Reply all
Reply to author
Forward
0 new messages