develooper Front page | perl.perl5.porters | Postings from April 2019

Re: Storable and Leaky hooks which die

Thread Previous | Thread Next
From:
Karl Williamson
Date:
April 17, 2019 03:02
Subject:
Re: Storable and Leaky hooks which die
Message ID:
5c8e72ea-80ec-02c7-f963-25f2e60461f2@khwilliamson.com
On 4/16/19 8:12 PM, Tony Cook wrote:
> On Wed, Apr 17, 2019 at 04:00:32AM +0200, Tomasz Konojacki wrote:
>> On Wed, 17 Apr 2019 11:18:26 +1000
>> Tony Cook <tony@develop-help.com> wrote:
>>
>>> For some reason I'm not seeing any leaks from an ASAN build.
>>>
>>>   ./Configure -des -Dusedevel -Accflags=-fsanitize=address -Aldflags=-fsanitize=address -DDEBUGGING -Doptimize=-O0\ -g -Dcc=/opt/gcc-8.2.0/bin/gcc
>>>
>>> valgrind picked up a leak of the ptr table from your example which is
>>> fixed in 1d7b2a7e3a7a0e05c254d065923488b768eb3ce0.
>>>
>>> Tony
>>
>> To enable leak detection in ASAN you need -fsanitize=leak flag.
>> -fsanitize=address is just for memory errors.
> 
> Yeah, I tried that too (ie. both address and leak).
> 
> https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer
> 
> implies that -fsanitize=leak isn't needed if you have
> -fsanitize=address.
> 
> Tony
> 

But it also says you need to set
  export ASAN_OPTIONS=detect_leaks=1

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About