https://bugs.kde.org/show_bug.cgi?id=436413
Bug ID: 436413
Summary: Warn about realloc of size zero
Product: valgrind
Version: unspecified
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: memcheck
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Calling realloc with a size of zero is so confusing that C11 deprecated it
http://www.open-std.org/jtc1/sc22/wg14/www/docs/summary.htm#dr_400
Given the above it is probably always a mistake when realloc is called with
size == 0 so it would be good to warn about that.
Currently vg_replace_malloc treats size <= 0 as free and returns NULL.
--
You are receiving this mail because:
You are watching all bug changes.