Re: Git 2.45.2 - memory leaks reports by address sanitizer (asan)

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

 



On Mon, Jun 10, 2024 at 02:37:05PM +0000, Janne Kiiskila wrote:

> Seems to me there's a few potential issues:
> - GitHub runners hanging (it should not hang, it should exit with error).
> - Git itself having potential memory leaks.
> - I am misusing the LD_PRELOAD and it can not or does not as I expect?
>   (i.e. it should just slow down the execution, but not report any failures if there are no leaks/other issues).
> 
> I have checked the git repo itself and you do have already some
> address sanitizing test jobs in there so I would assume you do not
> have leaks. 

There are most definitely leaks in Git. In our ASan runs we set
"detect_leaks=0" in ASAN_OPTIONS. We have a separate leak-checking
build, but are working towards having it completely clean. In the
meantime, individual scripts in our test suite are marked as leak-free
(about half of them).

As far as your use of LD_PRELOAD, I'm not sure. Typically you'd compile
with "-fsanitize=address", so the compiler is emitting extra code for
the sanitizer, in addition to linking against libasan. I don't know
enough about ASan to know whether just an LD_PRELOAD is enough to get
useful results. But in general it makes sense to me to only set the
LD_PRELOAD for the program you are interested in testing.

-Peff




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux