llvm / llvm/llvm-project

Sanitizer: Bypass too many leaks

Open
#175,777 0 comments 0 reactions 0 assignees View on GitHub
compiler-rt:lsan
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Hi,

Here's a repost of https://github.com/google/sanitizers/issues/1871

I'm using sanitizer with pytest to find leaks in my software through its tests. Pytest generates a lots of Python leaks so in my error log I have the "Too many leaks! Only the first 5000 leaks encountered will be reported" message.

My first question is how are the 5000 leaks selected ? 5000 biggest leaks ? 5000 first ?

Then, I would like to bypass this limits in order to be sure that I'm not missing any leaks from my c software interfaced in Python.
I've tried to "export LSAN_OPTIONS=max_leaks=0" but it seems not to work.

Thanks in advance for rep !

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the leak-report limit with the sanitizer under pytest and a C component interfaced with Python. Read the LSAN_OPTIONS max_leaks behavior and determine how the first 5000 leaks are selected. Done means the selection is explained and max_leaks=0 either bypasses the limit or its unsupported behavior is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, python
Domain
testing, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.