![]() The problem is that the assignment statement in Python never copies objects, this means that when we get a reference (returned by `SetConstIterator::operator*()` to internal query object it is valid only as long as the query lives. This means that without additional changes this is a problem for `RepoQuery`, `GroupQuery` and `EnvironmentQuery`. For me it doesn't crash with `RepoQuery` (probably due to different memory layout) but it is caught when run with Sanitizers or valgrind. To verify with valgrind: from `dnf5/test/python3/libdnf5` do `$ PROJECT_BINARY_DIR=../../../build \ PROJECT_SOURCE_DIR=../../../ valgrind python3.13 -m unittest \ repo.test_repo_query.TestRepoQuery.test_repo_query` This behavior is unexpected in Python, it should manage livetimes automatically. |
||
---|---|---|
.. | ||
data | ||
dnf5-plugins | ||
dnf5daemon-server | ||
go | ||
libdnf5 | ||
libdnf5-cli | ||
perl5 | ||
python3 | ||
ruby | ||
shared | ||
tutorial | ||
CMakeLists.txt |