mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 02:25:39 +01:00
c6b098655e
Exercise the library functions with calloc returning NULL for a size of 0. Make this a separate job with UBSan (and ASan) to detect places where we try to dereference the result of calloc(0) or to do things like buf = calloc(size, 1); if (buf == NULL && size != 0) return INSUFFICIENT_MEMORY; memcpy(buf, source, size); which has undefined behavior when buf is NULL at the memcpy call even if size is 0. This is needed because other test components jobs either use the system malloc which returns non-NULL on Linux and FreeBSD, or the memory_buffer_alloc malloc which returns NULL but does not give as useful feedback with ASan (because the whole heap is a single C object). |
||
---|---|---|
.. | ||
config-wrapper-malloc-0-null.h |