Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/jemalloc Check that the previous link exists be...



details:   https://anonhg.NetBSD.org/src/rev/01d6cf5df174
branches:  trunk
changeset: 449405:01d6cf5df174
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Mar 05 15:18:59 2019 +0000

description:
Check that the previous link exists before merging it.
XXX: Is that right? Fixing this makes the h_resolve test work.

diffstat:

 external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h |  12 +++++++-----
 external/bsd/jemalloc/include/jemalloc/internal/ph.h      |  12 +++++++-----
 2 files changed, 14 insertions(+), 10 deletions(-)

diffs (44 lines):

diff -r e223f0da90f3 -r 01d6cf5df174 external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h
--- a/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h Tue Mar 05 11:44:22 2019 +0000
+++ b/external/bsd/jemalloc/dist/include/jemalloc/internal/ph.h Tue Mar 05 15:18:59 2019 +0000
@@ -374,11 +374,13 @@
                                    parent);                            \
                        }                                               \
                } else {                                                \
-                       assert(phn_prev_get(a_type, a_field, phn) !=    \
-                           NULL);                                      \
-                       phn_next_set(a_type, a_field,                   \
-                           phn_prev_get(a_type, a_field, phn),         \
-                           phn_next_get(a_type, a_field, phn));        \
+                       a_type *prev = phn_prev_get(a_type, a_field,    \
+                           phn);                                       \
+                       if (prev != NULL) {                             \
+                               phn_next_set(a_type, a_field, prev,     \
+                                   phn_next_get(a_type, a_field,       \
+                                   phn));                              \
+                       }                                               \
                }                                                       \
                if (phn_next_get(a_type, a_field, phn) != NULL) {       \
                        phn_prev_set(a_type, a_field,                   \
diff -r e223f0da90f3 -r 01d6cf5df174 external/bsd/jemalloc/include/jemalloc/internal/ph.h
--- a/external/bsd/jemalloc/include/jemalloc/internal/ph.h      Tue Mar 05 11:44:22 2019 +0000
+++ b/external/bsd/jemalloc/include/jemalloc/internal/ph.h      Tue Mar 05 15:18:59 2019 +0000
@@ -374,11 +374,13 @@
                                    parent);                            \
                        }                                               \
                } else {                                                \
-                       assert(phn_prev_get(a_type, a_field, phn) !=    \
-                           NULL);                                      \
-                       phn_next_set(a_type, a_field,                   \
-                           phn_prev_get(a_type, a_field, phn),         \
-                           phn_next_get(a_type, a_field, phn));        \
+                       a_type *prev = phn_prev_get(a_type, a_field,    \
+                           phn);                                       \
+                       if (prev != NULL) {                             \
+                               phn_next_set(a_type, a_field, prev,     \
+                                   phn_next_get(a_type, a_field,       \
+                                   phn));                              \
+                       }                                               \
                }                                                       \
                if (phn_next_get(a_type, a_field, phn) != NULL) {       \
                        phn_prev_set(a_type, a_field,                   \



Home | Main Index | Thread Index | Old Index