Allow make test with ASan / --address-sanitizer

Andrew Bartlett abartlet at samba.org
Thu May 3 05:06:07 UTC 2018


On Thu, 2018-05-03 at 16:57 +1200, William Brown via samba-technical
wrote:
> On Thu, 2018-05-03 at 16:35 +1200, Andrew Bartlett via samba-technical
> wrote:
> > I needed to get AddressSanitizer working to fix the LSA use-after-
> > free
> > bug and the attached make it all work again.
> > 
> > Recent versions of GCC require that the library be in LD_PRELOAD
> > before
> > anything that is linked with libasan.  I use a horrible ldd hack to
> > find the right library path (sorry, not sorry).
> 
> It's what you have to do because of python being in the way. It's fine
> ... 
> 
> >  
> > 
> > Once we get a more modern sn-devel I'll enable this by default in
> > autobuild. 
> > 
> > Please review and push!
> > 
> > Andrew Bartlett
> 
> Looks good to me, I can't wait to use this more seriously!

A good way to help would be make autobuild.py take an --address-
sanitizer option (that we will eventually make the default) so we can
start trying to do the full build with ASan.

Andrew Bartlett

-- 
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT   
https://catalyst.net.nz/services/samba







More information about the samba-technical mailing list