Malloc failures check

Dmitry Belyavsky beldmit at gmail.com
Thu Nov 21 13:29:45 UTC 2019


Unfortunately, it is not a compile-time check...

I mean smth like
https://github.com/openssl/openssl/blob/ab5c77b4766e0992751d86560193ca42b49cf316/include/openssl/e_os2.h#L198-L202
but not sure it is applicable to external functions...

On Thu, Nov 21, 2019 at 1:42 PM Salz, Rich <rsalz at akamai.com> wrote:

>
>    - It would be possible to implement a malloc failure feature in the
>    test suite that systematically runs a test many times, failing successive
>    malloc calls.
>
>
>
> It’s there; look crypto/mem.c, shouldfail() and FAILTEST.
>
>
>
> More detail, from off-list discusson:
>
>
>
>     i=0
>
>     while : ; do
>
>            ((i++))
>
>            export MALLOC_FAILURE_CHECKS=${i}@100 openssl foo etc…
>
>            test -f core && echo crashed && exit 1
>
>      done
>
>
>
>
>


-- 
SY, Dmitry Belyavsky
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-project/attachments/20191121/d6cead37/attachment-0001.html>


More information about the openssl-project mailing list