Closed
Description
Due to the lack of a stable #[ffi_returns_twice]
attribute, vfork
cannot be safely used since it can cause memory corruption of unrelated local variables in the parent process.
Miscompilation example: https://play.rust-lang.org/?version=nightly&mode=release&edition=2018&gist=e192ab81e8d408fa9984f766e2356697
Fixed (but nightly-only) version with #[ffi_returns_twice]
: https://play.rust-lang.org/?version=nightly&mode=release&edition=2018&gist=0de019e56b69aa048f3e0f5319cc187e