bug-gnu-libiconv
[Top][All Lists]
Advanced

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

Re: [bug-gnu-libiconv] Address Sanitizer finding in libiconv_open iconv.


From: Jeffrey Walton
Subject: Re: [bug-gnu-libiconv] Address Sanitizer finding in libiconv_open iconv.c:234
Date: Sun, 12 May 2019 06:14:17 -0400

On Sat, May 11, 2019 at 1:14 AM Jeffrey Walton <address@hidden> wrote:
>
> On Mon, May 6, 2019 at 4:02 AM Bruno Haible <address@hidden> wrote:
> >
> > Hi Jeffrey,
> >
> > > I'm testing on Fedora 29, x86_64. I'm catching an address sanitizer
> > > finding in libiconvert-1.16. It was present in 1.15, but I did not
> > > investigate it. I'm using CFLAGS+=-fsanitize=address and
> > > CXXFLAGS+=-fsanitize=address (and LDFLAGS+=-fsanitize=address as
> > > needed).
> > > ...
> > > Direct leak of 288 byte(s) in 2 object(s) allocated from:
> > >     #0 0x7f75d3044c08 in __interceptor_malloc 
> > > (/lib64/libasan.so.5+0xefc08)
> > >     #1 0x7f75d2e6b1b1 in libiconv_open iconv.c:234
> >
> > The memory allocation at iconv.c:234 is the one that allocates a
> > conversion descriptor (iconv_t). If you see this one occur as a
> > "memory leak", it means that the caller of iconv_open() did not call
> > iconv_close() on the result.
> >
> > This might be OK for a test program. See the last paragraph of
> > https://www.gnu.org/prep/standards/html_node/Memory-Usage.html
>
> Thanks Bruno.
>
> I'm trying to build GnuPG, which depends upon iconv. Everything is
> being built with Asan for testing.
>
> It looks like iconv is causing GnuPG configuration tests to fail:
>
> checking if gcc supports -Wpointer-arith... yes
> checking whether "make check" shall run all tests... no
> configure:
> ***
> *** The system does not provide a working iconv function.  Please
> *** install a suitable library; for example GNU Libiconv which is
> *** available at:
> ***   https://ftp.gnu.org/gnu/libiconv/
> ***
> configure: error:
> ***
> *** Required libraries not found. Please consult the above messages
> *** and install them before running configure again.
> ***
>
> iconv is there, it is just causing a build error.

Here are the m4 macro changes: https://dev.gnupg.org/T4504

It was reported to the Autoconf folks. Hopefully they will pick it up.

Jeff



reply via email to

[Prev in Thread] Current Thread [Next in Thread]