Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #1072: add LSAN_DO_LEAK_CHECK macro #1073

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jiridanek
Copy link
Contributor

@jiridanek jiridanek commented Apr 23, 2023

This is just a proposal, but the general ideas are ready do be reviewed:

The motivation in the decision to close issue 293 is to call lsan explicitly and early. As a possible future extension, lsan could be runnable upon request from Python system_tests (via skmanage, for example)?

The disadvantage of this is that it will become impossible to start an lsan-enabled router multiple times in the same process (which is what (currently disabled) cpp_system tests do, (when run with lsan)). Whether such ability is (or might be in the future) valuable regarding improved testability is up to a discussion. From what I observed so far, it is not very promising avenue.

Other projects (like CPython) usually have some special leak-checking mode that is enabled with sanitizers. For example, python has an allocation list that collects all allocations so that they can be then orderly freed upon exit, if lsan is watching. This seems a bit too much like a silly workaround and waste of effort on first sight, but it gives them the ability to use this to fix leaks that happen during regular runtime (if you fix all leaks, then you will naturally fix also the important ones).

@codecov
Copy link

codecov bot commented Apr 23, 2023

Codecov Report

Merging #1073 (a9bea85) into main (32286a2) will increase coverage by 0.1%.
Report is 16 commits behind head on main.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1073     +/-   ##
=======================================
+ Coverage   77.7%   77.8%   +0.1%     
=======================================
  Files        247     247             
  Lines      63999   64000      +1     
  Branches    5896    5896             
=======================================
+ Hits       49738   49831     +93     
+ Misses     11564   11493     -71     
+ Partials    2697    2676     -21     
Flag Coverage Δ
pysystemtests 87.8% <ø> (+<0.1%) ⬆️
pyunittests 54.6% <ø> (ø)
systemtests 71.4% <ø> (+0.2%) ⬆️
unittests 21.9% <ø> (+<0.1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
unittests 25.9% <ø> (+<0.1%) ⬆️
systemtests 78.5% <ø> (+0.1%) ⬆️

@jiridanek jiridanek self-assigned this Jan 5, 2024
@jiridanek jiridanek requested a review from kgiusti January 5, 2024 19:25
@jiridanek jiridanek changed the title Issue # 1072: add LSAN_DO_LEAK_CHECK macro Issue #1072: add LSAN_DO_LEAK_CHECK macro Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant