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

Re: Storable and Leaky hooks which die

Thread Previous
Tony Cook
April 16, 2019 05:36
Re: Storable and Leaky hooks which die
Message ID:
On Mon, Apr 15, 2019 at 11:48:13AM +0100, Dave Mitchell wrote:
> Storage has some tests which leak, and thus cause smoke failures on blead
> when run under Address Sanitizer.
> An example of code which leaks is:
>     use Storable qw(store);
>     sub FreezeHookDies::STORABLE_freeze { die ${$_[0]} }
>     my $x = bless [], "FreezeHookDies";
>     eval { store($x, "store99"); 1 };
> I had a quick look at the source (which I'm not very familiar with)
> and decided it was non-trivial and non-obvious what the best way to fix
> it is. It's in the general category of mallocing temp buffers pointed
> to be local vars, which don't get freed if the code dies (and is caught by
> an eval).
> Since it looks too messy to fix for 5.30.0 I have, for now, with
> v5.29.9-133-g2cf7500760, skipped the leaky tests when run under ASan,
> but the skip will auto-re-enable in 5.31.x
> Dopes anyone more familiar with the internals of Storable want to have a
> go at fixing it, or at least suggest the best approach?

I'll take a look.


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About