summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2015-01-27 18:12:34 +0100
committerFelix S. Klock II <pnkfelix@pnkfx.org>2015-01-27 18:12:34 +0100
commit326443105b897171424c6efde15198cd7a25bc61 (patch)
tree47b3d1eeace292b32b0a9fa31d02e0c2bce9e5a1 /src/libstd/sys/unix/stack_overflow.rs
parente365e4c05454d94131d14d0207c12bb895a4c186 (diff)
downloadrust-326443105b897171424c6efde15198cd7a25bc61.tar.gz
rust-326443105b897171424c6efde15198cd7a25bc61.zip
trans: When coercing to `Box<Trait>` or `Box<[T]>`, leave datum in its original L-/R-value state.
This fixes a subtle issue where temporaries were being allocated (but
not necessarily initialized) to the (parent) terminating scope of a
match expression; in particular, the code to zero out the temporary
emitted by `datum.store_to` is only attached to the particular
match-arm for that temporary, but when going down other arms of the
match expression, the temporary may falsely appear to have been
initialized, depending on what the stack held at that location, and
thus may have its destructor erroneously run at the end of the
terminating scope.

Test cases to appear in a follow-up commit.

Fix #20055
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions