Module Name: src Committed By: martin Date: Thu Oct 3 17:29:33 UTC 2019
Modified Files: src/external/bsd/jemalloc/dist/src [netbsd-9]: jemalloc.c Log Message: Pull up following revision(s) (requested by christos in ticket #278): external/bsd/jemalloc/dist/src/jemalloc.c: revision 1.8 realloc(ptr, 0) != { free(ptr); return NULL; } http://www.open-std.org/jtc1/sc22/wg14/www/docs/summary.htm#dr_400 To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.7.4.1 src/external/bsd/jemalloc/dist/src/jemalloc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/bsd/jemalloc/dist/src/jemalloc.c diff -u src/external/bsd/jemalloc/dist/src/jemalloc.c:1.7 src/external/bsd/jemalloc/dist/src/jemalloc.c:1.7.4.1 --- src/external/bsd/jemalloc/dist/src/jemalloc.c:1.7 Thu Mar 14 21:49:32 2019 +++ src/external/bsd/jemalloc/dist/src/jemalloc.c Thu Oct 3 17:29:33 2019 @@ -2328,6 +2328,8 @@ je_realloc(void *ptr, size_t size) { LOG("core.realloc.entry", "ptr: %p, size: %zu\n", ptr, size); if (unlikely(size == 0)) { +#if 0 + // http://www.open-std.org/jtc1/sc22/wg14/www/docs/summary.htm#dr_400 if (ptr != NULL) { /* realloc(ptr, 0) is equivalent to free(ptr). */ UTRACE(ptr, 0, 0); @@ -2343,6 +2345,7 @@ je_realloc(void *ptr, size_t size) { LOG("core.realloc.exit", "result: %p", NULL); return NULL; } +#endif size = 1; }