Closed brokenbyte closed 1 year ago
Thanks. Don't know how no one noticed before. Fixed and return type has been changed. Pushing as a bug release as no one could actually use this function before anyway so the breaking change is irrelevant.
Also just noticed new2() is a function that exists apparently. I think this may have been a test function that accidentally hit release whoops.
Minimal reproducible example:
Dependencies:
cargo add pacmanconf alpm alpm_utils
GDB backtrace:
Valgrind Output
```text ==107909== Memcheck, a memory error detector ==107909== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al. ==107909== Using Valgrind-3.20.0 and LibVEX; rerun with -h for copyright info ==107909== Command: ./target/debug/segfault ==107909== ==107909== Invalid read of size 8 ==107909== at 0x486DA46: free_groupcache (db.c:494) ==107909== by 0x486DB6C: _alpm_db_free_pkgcache (db.c:517) ==107909== by 0x486D166: _alpm_db_free (db.c:329) ==107909== by 0x486C57D: _alpm_db_unregister (db.c:75) ==107909== by 0x485E409: alpm_release (alpm.c:106) ==107909== by 0x118693:I can also reproduce this in the latest version of
paru
(commit257e01155501e3f93ed218f3853156a030b20c58
) so I don't think it's from how I'm setting up theAlpm
struct.paru
patch file: