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: Mon, 6 May 2019 00:22:24 -0400

On Sun, May 5, 2019 at 11:03 PM Jeffrey Walton <address@hidden> wrote:
>
> 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).
>
> The other 150 or so tests preceding the finding are OK. I'm guessing
> this is unexpected.
>
> /bin/sh ./check-translit . Quotes UTF-8 ISO-8859-1
> /bin/sh ./check-translit . Quotes UTF-8 ASCII
> /bin/sh ./check-translit . Translit1 ISO-8859-1 ASCII
> /bin/sh ./check-translitfailure . TranslitFail1 ISO-8859-1 ASCII
> /bin/sh ./check-subst
> ./test-shiftseq
>
> =================================================================
> ==495==ERROR: LeakSanitizer: detected memory leaks
>
> 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
>     #2 0x7f75d2f3c562
> (/home/build/libiconv-1.16/lib/.libs/libiconv.so.2+0x116562)
>
> SUMMARY: AddressSanitizer: 288 byte(s) leaked in 2 allocation(s).
> gmake[1]: *** [Makefile:144: check] Error 1
> gmake[1]: Leaving directory '/home/build/libiconv-1.16/tests'
> gmake: *** [Makefile:95: check] Error 2
> Failed to test iConv
> Failed to build iConv
>
> I don't have better information for frame #2. I'm building with `-g2
> -O2` so it may be some C runtime startup code.
>
> The drag about a leak in a shared object is, C#, Java and Android will
> load/unload a library as needed. The library is unloaded/evicted when
> it is not needed The accumulated memory leak will grow over time until
> the device/app is starved of memory. The situation gives the OpenJDK
> folks a lot of problems on some platforms.

This is also causing failures in other modules like libunistring-1.9.10:

=================================================================
==29479==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 432 byte(s) in 3 object(s) allocated from:
    #0 0x7fe96ee69c08 in __interceptor_malloc (/lib64/libasan.so.5+0xefc08)
    #1 0x7fe96eca8c45 in libiconv_open iconv.c:234

SUMMARY: AddressSanitizer: 432 byte(s) leaked in 3 allocation(s).
FAIL test-striconveh (exit status: 1)

Jeff



reply via email to

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