From 63e526a4d82719b8973c57f730df97d4331f8269 Mon Sep 17 00:00:00 2001 From: Eugene Syromiatnikov Date: Fri, 11 Jul 2025 14:24:59 +0200 Subject: [PATCH] doc/man3/OPENSSL_malloc: improve OPENSSL_MALLOC_FAILURES documentation Reflect its ability to accept floating point numbers in the failure probability specification. Complements: 3df5736cf303 "Improve Malloc Failure Test" Signed-off-by: Eugene Syromiatnikov Reviewed-by: Neil Horman Reviewed-by: Tomas Mraz Reviewed-by: Dmitry Belyavskiy (Merged from https://github.com/openssl/openssl/pull/28025) --- doc/man3/OPENSSL_malloc.pod | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/man3/OPENSSL_malloc.pod b/doc/man3/OPENSSL_malloc.pod index d02eb47e9a6..ec6556b765c 100644 --- a/doc/man3/OPENSSL_malloc.pod +++ b/doc/man3/OPENSSL_malloc.pod @@ -167,12 +167,13 @@ respectively. If a pointer is NULL, then the corresponding count is not stored. The variable B controls how often allocations should fail. It is a set of fields separated by semicolons, which each field is a count -(defaulting to zero) and an optional atsign and percentage (defaulting -to 100). If the count is zero, then it lasts forever. For example, -C<100;@25> or C<100@0;0@25> means the first 100 allocations pass, then all -other allocations (until the program exits or crashes) have a 25% chance of -failing. The length of the value of B must be 256 or -fewer characters. +(defaulting to zero) and an optional atsign and percentage (interpreted +as a floating point number that is rounded up to two decimal digits +of precision, defaulting to 100). If the count is zero, then it lasts forever. +For example, C<100;@0.258> or C<100@0;0@0.258> means the first 100 allocations +pass, then all other allocations (until the program exits or crashes) have +a 0.26% chance of failing. The length of the value of B +must be 256 or fewer characters. If the variable B is parsed as a positive integer, then it is taken as an open file descriptor. This is used in conjunction with -- 2.47.3