llvm / llvm/llvm-project

Sanitizer: Alternative to asan.supp (asan.keep)

Open
#175,778 1 comment 0 reactions 0 assignees View on GitHub
compiler-rt:asan
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/1872

I'm using sanitizer with pytest to find leaks in my software through its tests. Pytest generates a lots of Python leaks, so I would like to filtered them. I've tried to use the asan.supp solution but it seems not to fit my need because I'm looking for leaks in my C software interfaced in Python.

So, for example, I've tried to supp the "function_code_fastcall" leaks, but it filter a C leaks because it's in the stack.

Instead of suppress stacks when a symbol or function is present, is it or would it be possible in sanitizer, to keep only stacks from library function match (for example: leaks:my_lyb_* to get stacks with function of this library) ?

I will add that I would be able to filter the error output of sanitizer to find leaks of my library (grep or other solution), but I'm limited by the sanitizer leaks limit that I am encountering https://github.com/google/sanitizers/issues/1871

Thanks in advance for rep !

Contributor guide

Open the contributing guide

Research direction

Read the asan.supp behavior and the linked sanitizer issues #1872 and #1871 first; reproduce the pytest leak scenario described here. Done means sanitizer provides a way to retain or report only stacks matching the user's C library without hitting the sanitizer leak limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, python
Domain
testing-qa, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.