[openssl/openssl] c45ca0: Fix GCC compilation -Waggressive-loop-optimizations

Adrien Zinger noreply at github.com
Tue Apr 2 17:41:56 UTC 2024


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: c45ca0656f8d1fe43b8cf444c88d295a063341ca
      https://github.com/openssl/openssl/commit/c45ca0656f8d1fe43b8cf444c88d295a063341ca
  Author: Adrien Zinger <zinger.ad at gmail.com>
  Date:   2024-04-02 (Tue, 02 Apr 2024)

  Changed paths:
    M crypto/bn/rsaz_exp_x2.c

  Log Message:
  -----------
  Fix GCC compilation -Waggressive-loop-optimizations

GCC 13.1.0 were reporting a compilation warning with -O2/3 and
-Waggressive-loop-optimizations. GCC is raising an undefined behavior in the
while loop. Replace the while loop with a memset call at the top of the
function.

Fixes #21088

CLA: trivial

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger at hotmail.de>
Reviewed-by: Neil Horman <nhorman at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23898)



To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications


More information about the openssl-commits mailing list