Segfault using result of place_back()
as a Place
#44637
Labels
B-unstable
Blocker: Implemented in the nightly compiler and unstable.
C-bug
Category: This is a bug.
I-unsound
Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
P-medium
Medium priority
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
When trying to write a data structure that wraps a
Vec
and is aPlacer
, I got a segfault when trying to use the result ofplace_back()
as aPlace
.I tried this code:
I expected to see this happen: Prints "Doesn't get here!", and exits with code 0.
Instead, this happened: Prints "Segmentation fault", and exits with code 139.
The error is fixed by uncommenting
.make_place()
.Meta
rustc --version --verbose
:rustc 1.22.0-nightly (fd4bef5 2017-09-15)
binary: rustc
commit-hash: fd4bef5
commit-date: 2017-09-15
host: x86_64-unknown-linux-gnu
release: 1.22.0-nightly
LLVM version: 4.0
Backtrace:
N/A?
The text was updated successfully, but these errors were encountered: