Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #548: fix soundness issue with
preallocated_gen_new
1e6eb6c shut clippy up (Andrew Poelstra) f961497 context: introduce unsafe `PreallocatedContext` trait (Andrew Poelstra) Pull request description: Stop this from being a generic function over all contexts, to only a function generic over contexts where we can bound the lifetime precisely. Introduces a new unsafe trait. I *believe* the only code this breaks was already unsound: * code that tried to use one of the `*Preallocated` context markers with an incorrect lifetime * code that tried to use `preallocated_gen_new` with a non-`*Preallocated` marker, which I believe we allowed before (I just noticed this now) and almost certainly would've led to UB on drop Fixes #543 ACKs for top commit: Kixunil: ACK 1e6eb6c tcharding: ACK 1e6eb6c Tree-SHA512: 44eb4637a2f86d5b16d40174cb9e27f37cf8eb4f29546159dbbdcd3326d01f9de2f500ba732376dd84e67ebc3528c709d2d4e2aceb8a329bcb9fb9d25c9b89cb
- Loading branch information