emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#48189: closed (ginstall: memory leak when omitting a directory)


From: GNU bug Tracking System
Subject: bug#48189: closed (ginstall: memory leak when omitting a directory)
Date: Mon, 03 May 2021 17:41:01 +0000

Your message dated Mon, 3 May 2021 10:40:24 -0700
with message-id <5d52298e-3b77-f51b-6444-2c900fca8a8f@cs.ucla.edu>
and subject line Re: bug#48189: ginstall: memory leak when omitting a directory
has caused the debbugs.gnu.org bug report #48189,
regarding ginstall: memory leak when omitting a directory
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
48189: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=48189
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: ginstall: memory leak when omitting a directory Date: Mon, 3 May 2021 14:13:06 +0000
Dear all.

We are a team from Singapore Management University and we wrote a symbolic execution tool based on KLEE recently. After running the Coreutils packages(the newest released version, 8.32), we found some interesting issues(most are reported as "detected memory leaks" and one is reported "stack-overflow" by AddressSanitizer). Due to this is our first time reporting a potential bug in this community, we are not sure these bugs found by our tool are useful. Therefore, we don't want to waste your precious time, and here we just want to report one bug to you. If you confirm this is a real bug and could be helpful to you, we will file other issues then. Thank you very much!

The following are instructions to help reproduce the issue:

$ginstall "/" "/" "--"
./ginstall: omitting directory '/'

=================================================================
==2394==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 80 byte(s) in 1 object(s) allocated from:
    #0 0x492bcf in __interceptor_malloc ../../../../libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x4ef365 in hash_initialize ../lib/hash.c:605
    #2 0x4e1362 in dest_info_init ../src/copy.c:1740
    #3 0x4d98d7 in main ../src/install.c:1050
    #4 0x7feef2e9abf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)

Indirect leak of 1264 byte(s) in 1 object(s) allocated from:
    #0 0x492d87 in __interceptor_calloc ../../../../libsanitizer/asan/asan_malloc_linux.cpp:154
    #1 0x50119b in rpl_calloc ../lib/calloc.c:65
    #2 0x4ef45c in hash_initialize ../lib/hash.c:626
    #3 0x4e1362 in dest_info_init ../src/copy.c:1740
    #4 0x4d98d7 in main ../src/install.c:1050
    #5 0x7feef2e9abf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)

SUMMARY: AddressSanitizer: 1344 byte(s) leaked in 2 allocation(s).

$./ginstall --version
install (GNU coreutils) 8.32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.

$uname -a
Linux jlx-super-server 5.4.0-72-generic #80~18.04.1-Ubuntu SMP Mon Apr 12 23:26:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

The configure option is "../configure --disable-nls CFLAGS="-fsanitize=address -static-libasan -g" CXXFLAGS="-fsanitize=address -static-libasan -g"

By the way, may I ask if the issues reported by AddressSanitizer are really bugs worth reporting? I am not sure whether such a tool will report some false-positive cases.

Thanks again for your time and help!


Best regards,
Haoxin

--- End Message ---
--- Begin Message --- Subject: Re: bug#48189: ginstall: memory leak when omitting a directory Date: Mon, 3 May 2021 10:40:24 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 That one's not a real bug. 'install' is exiting, rather than calling 'free' a couple of times just before exiting; calling 'free' would simply chew up runtime resources for no reason other than to pacify AddressSanitizer. So I'll close this particular bug report.

Most memory leaks found by AddressSanitizer in coreutils are false alarms. That being said, if you find one that isn't a false alarm we'd be interested in hearing about it. Stack overflows are also good to report too, except for tricky user-specified regular expressions (which require exponential resources in the worst case, no matter what the implementation is).


--- End Message ---

reply via email to

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