[openssl/openssl] 5a07d9: Correct the documentation for OPENSSL_MALLOC_FD

Matt Caswell noreply at github.com
Wed Aug 17 11:00:07 UTC 2022


  Branch: refs/heads/openssl-3.0
  Home:   https://github.com/openssl/openssl
  Commit: 5a07d91dc9e787e5e4a2ff5b41bc0ebdcb4efd0a
      https://github.com/openssl/openssl/commit/5a07d91dc9e787e5e4a2ff5b41bc0ebdcb4efd0a
  Author: Matt Caswell <matt at openssl.org>
  Date:   2022-08-17 (Wed, 17 Aug 2022)

  Changed paths:
    M doc/man3/OPENSSL_malloc.pod

  Log Message:
  -----------
  Correct the documentation for OPENSSL_MALLOC_FD

The documentation was misleading in that it suggests that this environment
variable will record information about all allocations. While this is true
it doesn't record the most useful information that you might expect such
as the requested size of the allocation! It is mainly for use in
conjunction with OPENSSL_MALLOC_FAILURES, and reports information about
what chance an allocation has of failing.

We also clarify that the mem_debug functions are actually no-ops in 3.0.

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18967)

(cherry picked from commit 2c35d61790603530d11f52eda9132ff8640f9852)


  Commit: b89f113149b7bd5173f4100884aab354ad6da74d
      https://github.com/openssl/openssl/commit/b89f113149b7bd5173f4100884aab354ad6da74d
  Author: Matt Caswell <matt at openssl.org>
  Date:   2022-08-17 (Wed, 17 Aug 2022)

  Changed paths:
    M crypto/mem.c

  Log Message:
  -----------
  CRYPTO_mem_debug_push() and CRYPTO_mem_debug_pop() should return 0

Those 2 functions historically only ever returned 0 or 1. In OpenSSL 3.0
they were made no-ops and the documentation says they always return 0. In
fact they were returning -1. If any application was actually using these
functions then it may appear that they were actually successful (e.g. -1
could be interpreted as "true").

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18967)

(cherry picked from commit f868454257560c78570549f6a34d5918f03898a0)


Compare: https://github.com/openssl/openssl/compare/8bb9fecf6341...b89f113149b7


More information about the openssl-commits mailing list