rust/library
Yuki Okushi 9ce0820eef
Rollup merge of #82804 - alexcrichton:fix-wasi, r=pnkfelix
std: Fix a bug on the wasm32-wasi target opening files

This commit fixes an issue pointed out in #82758 where LTO changed the
behavior of a program. It turns out that LTO was not at fault here, it
simply uncovered an existing bug. The bindings to
`__wasilibc_find_relpath` assumed that the relative portion of the path
returned was always contained within thee input `buf` we passed in. This
isn't actually the case, however, and sometimes the relative portion of
the path may reference a sub-portion of the input string itself.

The fix here is to use the relative path pointer coming out of
`__wasilibc_find_relpath` as the source of truth. The `buf` used for
local storage is discarded in this function and the relative path is
copied out unconditionally. We might be able to get away with some
`Cow`-like business or such to avoid the extra allocation, but for now
this is probably the easiest patch to fix the original issue.
2021-03-14 13:07:33 +09:00
..
alloc Auto merge of #82760 - WaffleLapkin:unleak_extend_from_within, r=kennytm 2021-03-13 07:06:01 +00:00
backtrace@af078ecc0b std: Update the backtrace crate submodule 2020-11-20 11:56:07 -08:00
core Rollup merge of #81465 - joshtriplett:duration-formatting-documentation, r=m-ou-se 2021-03-14 13:07:27 +09:00
panic_abort slightly more typed interface to panic implementation 2020-12-21 13:37:59 +01:00
panic_unwind Revert stabilizing integer::BITS. 2021-02-03 22:23:58 +01:00
proc_macro impl PartialEq<Punct> for char; symmetry for #78636 2021-02-19 17:28:19 -08:00
profiler_builtins Build newly added InstrProfilingVersionVar.c file 2021-03-01 23:35:35 +01:00
rtstartup Bump bootstrap compiler to 1.50 beta 2020-12-30 09:27:19 -05:00
rustc-std-workspace-alloc
rustc-std-workspace-core Fix rustc-std-workspace-core documentation 2020-12-20 15:23:21 +08:00
rustc-std-workspace-std
std Rollup merge of #82804 - alexcrichton:fix-wasi, r=pnkfelix 2021-03-14 13:07:33 +09:00
stdarch@9c732a56f6 Update stdarch submodule 2020-12-21 00:00:00 +00:00
term Allow/fix non_fmt_panic in tests. 2021-02-03 23:15:45 +01:00
test Auto merge of #82350 - ehuss:test-chapter, r=jyn514 2021-02-28 09:18:27 +00:00
unwind Change built-in kernel targets to be os = none throughout 2021-03-01 12:46:25 -05:00