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

Fix memory leaks when using zchunk #322

Merged
merged 4 commits into from
Aug 5, 2024

Conversation

kontura
Copy link
Contributor

@kontura kontura commented Jul 19, 2024

It also adds a cmake option to build with sanitizers.

Disabled by default, only for debugging.

When using it it may be required to manually preload:
`LD_PRELOAD=/usr/lib64/libasan.so.8` for the client process.
This is because ASan runtime requires to be first in initial library list.
Since the `zckCtx` from `zckDL` is referenced only in `zckDL` and there
is only a single `zckDL` per `LrDownloadTarget` we have to free previous
`zckCtx` before overwriting it.
Otherwise it leaks.
Apart from these two places the `zck_dl` is leaking through other code
paths. Handle it and stuff it contains in a single place.
@jan-kolarik jan-kolarik merged commit a750e1c into rpm-software-management:master Aug 5, 2024
7 checks passed
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.

2 participants