Re: [PATCH 4/4] leaking_addresses: add scan_once array

2018-02-25 Thread Tobin C. Harding
On Sun, Feb 25, 2018 at 06:09:53PM -0700, Tycho Andersen wrote: > Hi Tobin, > > On Mon, Feb 19, 2018 at 01:50:49PM +1100, Tobin C. Harding wrote: > > +sub already_scanned > > +{ > > + my ($filename) = @_; > > + state %seen; > > + > > + foreach (@once_only) { > > + if

Re: [PATCH 4/4] leaking_addresses: add scan_once array

2018-02-25 Thread Tobin C. Harding
On Sun, Feb 25, 2018 at 06:09:53PM -0700, Tycho Andersen wrote: > Hi Tobin, > > On Mon, Feb 19, 2018 at 01:50:49PM +1100, Tobin C. Harding wrote: > > +sub already_scanned > > +{ > > + my ($filename) = @_; > > + state %seen; > > + > > + foreach (@once_only) { > > + if

Re: [PATCH 4/4] leaking_addresses: add scan_once array

2018-02-25 Thread Tycho Andersen
Hi Tobin, On Mon, Feb 19, 2018 at 01:50:49PM +1100, Tobin C. Harding wrote: > +sub already_scanned > +{ > + my ($filename) = @_; > + state %seen; > + > + foreach (@once_only) { > + if (/^$filename$/) { > + if ($seen{$_} == 1) { This should be something

Re: [PATCH 4/4] leaking_addresses: add scan_once array

2018-02-25 Thread Tycho Andersen
Hi Tobin, On Mon, Feb 19, 2018 at 01:50:49PM +1100, Tobin C. Harding wrote: > +sub already_scanned > +{ > + my ($filename) = @_; > + state %seen; > + > + foreach (@once_only) { > + if (/^$filename$/) { > + if ($seen{$_} == 1) { This should be something

[PATCH 4/4] leaking_addresses: add scan_once array

2018-02-18 Thread Tobin C. Harding
There are files under /proc that have the same format for each PID, e.g 'smaps'. We need only scan these files a single time to verify that they are not leaking addresses. This reduces the work the script must do. Add once_only array. Signed-off-by: Tobin C. Harding ---

[PATCH 4/4] leaking_addresses: add scan_once array

2018-02-18 Thread Tobin C. Harding
There are files under /proc that have the same format for each PID, e.g 'smaps'. We need only scan these files a single time to verify that they are not leaking addresses. This reduces the work the script must do. Add once_only array. Signed-off-by: Tobin C. Harding ---