[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gnu-libiconv] Address Sanitizer finding in libiconv_open iconv.c:23
From: |
Jeffrey Walton |
Subject: |
[bug-gnu-libiconv] Address Sanitizer finding in libiconv_open iconv.c:234 |
Date: |
Sun, 5 May 2019 23:03:50 -0400 |
Hi Everyone/Bruno,
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.
Jeff
- [bug-gnu-libiconv] Address Sanitizer finding in libiconv_open iconv.c:234,
Jeffrey Walton <=