[openssl/openssl] 2c35d6: Correct the documentation for OPENSSL_MALLOC_FD

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


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 2c35d61790603530d11f52eda9132ff8640f9852
      https://github.com/openssl/openssl/commit/2c35d61790603530d11f52eda9132ff8640f9852
  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)


  Commit: f868454257560c78570549f6a34d5918f03898a0
      https://github.com/openssl/openssl/commit/f868454257560c78570549f6a34d5918f03898a0
  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)


Compare: https://github.com/openssl/openssl/compare/b2ccfd81025f...f86845425756


More information about the openssl-commits mailing list