diff options
| author | Björn Steinbrink <bsteinbr@gmail.com> | 2015-05-19 09:50:48 +0200 |
|---|---|---|
| committer | Björn Steinbrink <bsteinbr@gmail.com> | 2015-05-19 14:25:35 +0200 |
| commit | b802b187303ff3499849c5763d3dcd39f1b6c3cf (patch) | |
| tree | 487080328072a479e7e36c1b4620c4604d077d3e /src/rustllvm/RustWrapper.cpp | |
| parent | 84b1e084862c08c19c36f0cf1f3698343c8ba7fa (diff) | |
| download | rust-b802b187303ff3499849c5763d3dcd39f1b6c3cf.tar.gz rust-b802b187303ff3499849c5763d3dcd39f1b6c3cf.zip | |
Don't call drop when taking the address of unsized fields
When taking the address of an unsized field we generate a rvalue datum for the field and then convert it to an lvalue datum. At that point, cleanup is scheduled for the field, leading to multiple drop calls. The problem is that we generate an rvalue datum for the field, since the pointer does not own the data and there's already cleanup scheduled elsewhere by the true owner. Instead, an lvalue datum must be created. Thanks to @eddyb for identifying the underlying cause and suggesting the correct fix. Fixes #25549 Fixes #25515
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
