This commit fixes a critical memory leak with the inserting RPC commands. We must initialize the cmd_flags with the delete key, otherwise they hang around in memory forever; potentially leaking significant amounts of resources.
From https://github.com/jesec/rtorrent/commit/f9a875b633eb083ec82f89ebeae8678ca424e8b2
This commit ensures session files land on the disk in the event of a system crash or power outage. It prevents data corruption of rTorrent session files, which causes torrent client breakage.
Optimizations from the initial implementation include
1) Skipping unnecessary file metadata updates during the sync process.
2) Skipping variable initialization since open will assign -1 on failure.
This commit fixes compiling rTorrent with LTO (Link Time Optimizations). We just need to rename from variables in the directory_entry structure to avoid ODR and ZLIB conflicts.
Author: kannibalox <kannibalox@gmail.com>
Date: Mon Jun 10 13:09:29 2024 -0400
Use regular iterators intead of bucket-local ones
Trying to manually predict which bucket a hashed key will land in does not
appear to be well-defined behavior.
Fixes#1285
rTorrent will do this gradually, so we can start connecting to peers right away.
This patch shaves approximately 5 minutes off the start time with thousands of torrents.
There appears to have been some change on openSUSE (likely some new
hardening flags for builds, or some glibc hardening) such that incorrect
buffer handling results in a segfault even if the buffer is never
overflowed.
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>