From: Eugene Syromiatnikov Date: Thu, 28 Aug 2025 14:37:19 +0000 (+0200) Subject: doc/man3/OPENSSL_malloc.pod: size is no longer needed to be alignment multiple X-Git-Tag: 4.0-PRE-CLANG-FORMAT-WEBKIT~498 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb567ac358682a5549810ff454c8d2c2356f9312;p=thirdparty%2Fopenssl.git doc/man3/OPENSSL_malloc.pod: size is no longer needed to be alignment multiple While the commit 648803a17e4c1 "crypto/mem.c: don't use aligned_alloc in CRYPTO_aligned_alloc" removed the aligned_alloc() usage along with its overly onerous requirements, its author failed to update the documentation accordingly. Correct that omission by removing the requirement from the DESCRIPTION and adding a relevant mention in HISTORY. Complements: 648803a17e4c1 "crypto/mem.c: don't use aligned_alloc in CRYPTO_aligned_alloc" Signed-off-by: Eugene Syromiatnikov Reviewed-by: Neil Horman Reviewed-by: Saša Nedvědický (Merged from https://github.com/openssl/openssl/pull/28295) --- diff --git a/doc/man3/OPENSSL_malloc.pod b/doc/man3/OPENSSL_malloc.pod index c101f085039..ffea63b1690 100644 --- a/doc/man3/OPENSSL_malloc.pod +++ b/doc/man3/OPENSSL_malloc.pod @@ -125,8 +125,7 @@ OPENSSL_zalloc() calls memset() to zero the memory before returning. OPENSSL_aligned_alloc() operates just as OPENSSL_malloc() does, but it allows for the caller to specify an alignment value, for instances in which the default alignment of malloc is insufficient for the caller's -needs. Note, the alignment value must be a power of 2, and the size -specified must be a multiple of the alignment. +needs. Note, the alignment value must be a power of 2. NOTES: =over 4 @@ -317,6 +316,11 @@ OPENSSL_realloc_array(), OPENSSL_clear_realloc_array(), CRYPTO_malloc_array(), CRYPTO_calloc(), CRYPTO_aligned_alloc_array(), CRYPTO_realloc_array(), CRYPTO_clear_realloc_array() were added in OpenSSL 3.6. +Before OpenSSL 3.6, there was an OPENSSL_aligned_malloc() requirement +that the size must be a multiple of the alignment, that was enforced +only on platforms that do not provide posix_memalign(3), but do provide +aligned_alloc(3). + =head1 COPYRIGHT Copyright 2016-2025 The OpenSSL Project Authors. All Rights Reserved.