rust/library/std/src
Ian Jackson 820123a949 panic/fork: Command: Do not unwind after fork() in child
Unwinding after fork() in the child is UB on some platforms, because
on those (including musl) malloc can be UB in the child of a
multithreaded program, and unwinding must box for the payload.

Even if it's safe, unwinding past fork() in the child causes whatever
traps the unwind to return twice.  This is very strange and clearly
not desirable.  With the default behaviour of the thread library, this
can even result in a panic in the child being transformed into zero
exit status (ie, success) as seen in the parent!

Fixes #79740.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2021-05-07 11:17:44 +01:00
..
backtrace Add Frames iterator for Backtrace 2021-01-23 11:56:33 -06:00
collections Rollup merge of #84328 - Folyd:stablize_map_into_keys_values, r=m-ou-se 2021-05-06 13:30:54 +02:00
env std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
error std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
f32 std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
f64 std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
ffi Change 'NULL' to 'null' 2021-05-02 17:46:00 -06:00
fs Fix test metadata_access_times to also check for Unsupported 2021-04-18 09:29:24 +02:00
io Auto merge of #79930 - tgnottingham:bufwriter_performance, r=m-ou-se 2021-05-06 20:04:32 +00:00
lazy Upgrade wasm32 image to Ubuntu 20.04 2021-02-06 13:05:56 +01:00
memchr std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
net Add link to Issue #34202 in udp docs 2021-05-02 19:13:41 -04:00
num rustc_expand: Mark inner #![test] attributes as soft-unstable 2020-11-20 19:35:03 +03:00
os Allow documenting on hermit 2021-05-03 16:56:22 +02:00
panic review: fix nits and move panic safety tests to the correct place 2020-09-25 23:10:24 +02:00
path Refactor parse_prefix on Windows 2020-11-07 16:15:48 +01:00
prelude Bump cfgs 2021-04-04 14:57:05 -04:00
process std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
sync Simplify Mutex::into_inner 2021-04-28 13:56:23 +02:00
sys panic/fork: Command: Do not unwind after fork() in child 2021-05-07 11:17:44 +01:00
sys_common Override clone_from method for PathBuf and OsString 2021-04-27 15:20:59 +02:00
thread Rollup merge of #84409 - mzohreva:mz/tls-dtors-before-join, r=jethrogb 2021-05-07 00:38:33 +02:00
time Duration::zero() -> Duration::ZERO 2020-10-21 20:44:03 -07:00
alloc.rs Fix safety comment 2021-01-07 09:13:21 +01:00
ascii.rs Convert many files to intra-doc links 2020-09-02 17:37:40 -04:00
backtrace.rs Add Frames iterator for Backtrace 2021-01-23 11:56:33 -06:00
env.rs Rollup merge of #84709 - joshtriplett:doc-alias-chdir, r=dtolnay 2021-05-05 17:52:20 +02:00
error.rs Document "standard" conventions for error messages 2021-04-02 15:11:49 +03:00
f32.rs doc: cube root, not cubic root 2021-02-26 19:03:44 +01:00
f64.rs doc: cube root, not cubic root 2021-02-26 19:03:44 +01:00
fs.rs clean up example on read_to_string 2021-04-10 12:50:04 -05:00
keyword_docs.rs Turn old edition lints (anonymous-parameters, keyword-idents) into warn-by-default on 2015 2021-04-12 09:45:59 -07:00
lazy.rs Use DebugStruct::finish_non_exhaustive() in std. 2021-03-27 13:29:23 +01:00
lib.rs move core::hint::black_box under its own feature gate 2021-04-25 11:08:12 +02:00
macros.rs Use #[doc = include_str!()] in std 2021-02-23 15:54:55 +01:00
memchr.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
num.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
panic.rs std panicking: Provide panic::always_abort 2021-05-07 11:17:44 +01:00
panicking.rs std panicking: ALWAYS_ABORT: use Relaxed memory ordering 2021-05-07 11:17:44 +01:00
path.rs Override clone_from method for PathBuf and OsString 2021-04-27 15:20:59 +02:00
primitive_docs.rs Rollup merge of #83553 - jfrimmel:addr-of, r=m-ou-se 2021-05-05 17:52:18 +02:00
process.rs Rework at_exit to cleanup 2021-04-22 10:34:48 +02:00
rt.rs Remove Once from init 2021-04-22 18:00:18 +02:00
time.rs Drop support for cloudabi targets 2020-11-22 17:11:41 -05:00