sbuild-util: use resize instead of reserve #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "Arsen/reschroot:main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Using reserved but uninitialized space is invalid, and, additionally,
reserve is not required to allocate memory or change the buffer size at
all.
Hi! A user of schroot on Gentoo Hardened, which enables
_GLIBCXX_ASSERTIONS, spotted this misuse of reserve/capacity insbuild-util.cc, which would prevent schroot starting quite early. This patch converts the reserve call to resize.The current usage of capacity is not correct, as reserving is not considered a binding operation, and the space it initializes is not considered initialized or otherwise usable.
This patch corrected the issue they were seeing.
Thanks in advance, have a great evening!
ping
LGTM, needs rebase though.
6d7a762d6dto1200bef15eokay, done (sorry for taking a while, email slipped my inbox, I only noticed when I logged into codeberg)
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.