summaryrefslogtreecommitdiff
path: root/tests/rustdoc-js-std/parser-errors.js
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-10-12 10:51:31 +0000
committerbors <bors@rust-lang.org>2022-10-12 10:51:31 +0000
commit50f6d337c632cbb5bd1dc3a80b5d428cebd8dce4 (patch)
treec241dcdf7f0df64cbd1ecdfdf055f905182b11ac /tests/rustdoc-js-std/parser-errors.js
parente6ce5627a9e8af9ae4673a390954fffaf526e5cc (diff)
parent4c5d6bb490af0b046c4e445ae90edc0c38623591 (diff)
downloadrust-50f6d337c632cbb5bd1dc3a80b5d428cebd8dce4.tar.gz
Auto merge of #102460 - flba-eb:fix_85261_prevent_alloc_after_fork, r=thomcc
Prevent UB in child process after calling libc::fork After calling libc::fork, the child process tried to access a TLS variable when processing a panic. This caused a memory allocation which is UB in the child. To prevent this from happening, the panic handler will not access the TLS variable in case `panic::always_abort` was called before. Fixes #85261 (not only on Android systems, but also on Linux/QNX with TLS disabled, see issue for more details) Main drawbacks of this fix: * Panic messages can incorrectly omit `core::panic::PanicInfo` struct in case several panics (of multiple threads) occur at the same time. The handler cannot distinguish between multiple panics in different threads or recursive ones in the same thread, but the message will contain a hint about the uncertainty. * `panic_count::increase()` will be a bit slower as it has an additional `if`, but this should be irrelevant as it is only called in case of a panic.
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions