-
Notifications
You must be signed in to change notification settings - Fork 67
Closed
Labels
A-objc2Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` cratesAffects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` cratesI-unsoundA soundness hole, or affecting soundnessA soundness hole, or affecting soundness
Milestone
Description
Autoreleasing objects using rc::autoreleasepool is unsound because we cannot ensure that the lifetime from an outer pool is not used inside an inner pool.
To help mitigate that, we provide the auto trait AutoreleaseSafe, which can be enabled with the "unstable-autoreleasesafe" feature (requires nightly, since auto traits are unstable).
Even with that, though, other libraries such as scoped-tls-hkt make assumptions that break our assumptions, see the code example provided here.
So we need some other way to make autorelease pools safe (or resort to marking them unsafe).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-objc2Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` cratesAffects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` cratesI-unsoundA soundness hole, or affecting soundnessA soundness hole, or affecting soundness