Re: [PATCH 3/4] logger: fix memory leaks [asan]

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

 



On 16 September 2017 at 01:54, J William Piggott <elseifthen@xxxxxxx> wrote:
> On 09/15/2017 07:05 AM, Karel Zak wrote:
>> On Mon, Sep 11, 2017 at 08:57:16PM +0100, Sami Kerola wrote:
>>  The mem-leaks are bad thing in daemons, libs, libs tests, and
>>  allocation in loop is dangerous, otherwise for command line utils you
>>  waste time with this kind of free() calls, because kernel on exit()
>>  will be faster to remove all the program from memory.
>
> Does this rule apply to the free() calls in hwclock.c?

What I was trying to to achieve was as few ASAN failures as possible.
That makes seeing memory corruptions, buffer overflows and other
things that do matter easier. Maybe adding supressions is good
enough way to deal the rest.

https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer

Thank you Karel making my patches better. Here's what I can still
see:

https://pastebin.com/raw/U4CSUrxS

Compiled with these:

export CC=clang
export CFLAGS='-fsanitize=address -ggdb'
export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer

And disk-utils/partx.c needs atexit(close_stdout); commented out
to display errors.

-- 
Sami Kerola
http://www.iki.fi/kerolasa/
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux