[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Memory leaks in Make
From: |
Jeffrey Walton |
Subject: |
Memory leaks in Make |
Date: |
Tue, 14 May 2019 22:18:50 -0400 |
Hi Everyone,
My apologies if I raised this issue already. I did not see it in the
archives at https://lists.gnu.org/archive/html/bug-make/2019-04/index.html
or https://lists.gnu.org/archive/html/bug-make/2019-05/index.html .
I'm trying to test libidn with Asan, which is used for
internationalized domain names. IDN also uses Gnulib and Gnulib is
resisting testing. I can build everything with -fsanitize=address, but
Gnulib test runners are doing something such that libasan.so is not
being loaded properly. It results in all tests runners failing.
The work-around is to LD_PRELOAD libasan.so. Unfortunately for me,
that means I have to LD_PRELOAD on the invocation of make. So,
running:
LD_PRELOAD=/lib64/libasan.so.5 make check
Results in:
=================================================================
==19205==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 56 byte(s) in 1 object(s) allocated from:
#0 0x7feb1d6e1c08 in __interceptor_malloc (/lib64/libasan.so.5+0xefc08)
#1 0x55f2ff6d2778 in xmalloc (/usr/bin/make+0x1d778)
Indirect leak of 33 byte(s) in 1 object(s) allocated from:
#0 0x7feb1d62de60 in strdup (/lib64/libasan.so.5+0x3be60)
#1 0x55f2ff6d29ec in xstrdup (/usr/bin/make+0x1d9ec)
SUMMARY: AddressSanitizer: 89 byte(s) leaked in 2 allocation(s).
It looks like Make's memory leaks are killing the build process long
before the test runners execute.
It would be nice if Make cleaned up its resources before exiting. The
leaks are affecting other components, and they have halted Asan
testing for this unit. LD_PRELOAD was my last chance to test this
library, and I don't seem to have any other alternatives.
I'm working on Fedora 29 with Make 4.2.1, but I have a feeling
platform and versions do not matter.
Jeff
- Memory leaks in Make,
Jeffrey Walton <=