https://sourceware.org/bugzilla/show_bug.cgi?id=21281
Bug ID: 21281 Summary: Cannot compile Binutils with ASAN because of a memory leak bug in sysinfo.c Product: binutils Version: 2.29 (HEAD) Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: thuanpv at comp dot nus.edu.sg Target Milestone: --- Dear all, I would like to report a potential memory leak in Binutils' sysinfo utility which prevents us from compiling the toolset with ASAN. I face the issue on Ubuntu 64-bit 14.04 and Binutils version is commit 09220eae9df07c40d206a35e6caaecba92ab8f46 Author: GDB Administrator <gdbad...@sourceware.org> Date: Tue Mar 21 00:00:24 2017 +0000 Automatic date update in version.in I configured and compiled Binutils using the following commands using clang-3.5 mkdir build-asan; cd build-asan CC=clang CFLAGS="-DFORTIFY_SOURCE=2 -fstack-protector-all -fsanitize=undefined,address -fno-omit-frame-pointer -g -Wno-error" ../configure --disable-shared --disable-gdb --disable-libdecnumber --disable-readline --disable-sim make clean all Here is the error message I got: ================================================================= ==92396==ERROR: LeakSanitizer: detected memory leaks Direct leak of 7122 byte(s) in 755 object(s) allocated from: #0 0x49c29b in __interceptor_malloc (/home/ubuntu/subjects/binutils-newest/build-asan/binutils/sysinfo+0x49c29b) #1 0x4c7161 in yylex /home/ubuntu/subjects/binutils-newest/build-asan/binutils/../../binutils/syslex.l:51:13 #2 0x4bb13c in yyparse /home/ubuntu/subjects/binutils-newest/build-asan/binutils/sysinfo.c:1177:16 #3 0x4c4c05 in main /home/ubuntu/subjects/binutils-newest/build-asan/binutils/../../binutils/sysinfo.y:420:3 #4 0x2b604a4def44 in __libc_start_main /build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:287 SUMMARY: AddressSanitizer: 7122 byte(s) leaked in 755 allocation(s). Regards, Thuan -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils