Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/external/bsd/jemalloc/dist/src Pull up following revision...



details:   https://anonhg.NetBSD.org/src/rev/68c64ebd9f8d
branches:  netbsd-9
changeset: 1000938:68c64ebd9f8d
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Oct 03 17:29:33 2019 +0000

description:
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

diffstat:

 external/bsd/jemalloc/dist/src/jemalloc.c |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (20 lines):

diff -r 21a4167c923f -r 68c64ebd9f8d external/bsd/jemalloc/dist/src/jemalloc.c
--- a/external/bsd/jemalloc/dist/src/jemalloc.c Thu Oct 03 17:26:00 2019 +0000
+++ b/external/bsd/jemalloc/dist/src/jemalloc.c Thu Oct 03 17:29:33 2019 +0000
@@ -2328,6 +2328,8 @@
        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 @@
                        LOG("core.realloc.exit", "result: %p", NULL);
                        return NULL;
                }
+#endif
                size = 1;
        }
 



Home | Main Index | Thread Index | Old Index