diff options
| author | DJ Delorie <dj@delorie.com> | 2016-07-19 22:22:46 -0400 |
|---|---|---|
| committer | DJ Delorie <dj@delorie.com> | 2016-07-19 22:22:46 -0400 |
| commit | f57aaed3b2fb73aa3ecc40e5afa1030681c93bf4 (patch) | |
| tree | f5bfc008fa28d68fa58fad8313006239275f34c6 /malloc/trace_run.c | |
| parent | 2c5e3bf401fa46ca2545820a68b4c2b5c1ee1bce (diff) | |
| download | glibc-f57aaed3b2fb73aa3ecc40e5afa1030681c93bf4.tar.xz glibc-f57aaed3b2fb73aa3ecc40e5afa1030681c93bf4.zip | |
Minor tweaks to trace_run and trace2wl
trace_run - fix realloc returning NULL behavior
trace2wl - hard stop on multi-level inversion, print number
of fixed inversions.
Diffstat (limited to 'malloc/trace_run.c')
| -rw-r--r-- | malloc/trace_run.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/malloc/trace_run.c b/malloc/trace_run.c index 3b74ce3fb9..91331e4946 100644 --- a/malloc/trace_run.c +++ b/malloc/trace_run.c @@ -413,19 +413,13 @@ thread_common (void *my_data_v) myabort(); if (p2 > n_ptrs) myabort(); + /* we can't force realloc to return NULL (fail), so just skip it. */ + if (p2 == 0) + break; + if (ptrs[p1]) atomic_rss (-sizes[p1]); free_wipe(p1); - /* we can't force realloc to return NULL (fail), so just skip it. */ - if (p2 == 0) - { - if (p1) - { - free ((void *)ptrs[p1]); - ptrs[p1] = 0; - } - break; - } stime = rdtsc_s(); Q1; #ifdef MDEBUG |
