Skip to content

dst-dtor-2 is failing on the bsd snapshot bot #16826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alexcrichton opened this issue Aug 28, 2014 · 2 comments · Fixed by #16838
Closed

dst-dtor-2 is failing on the bsd snapshot bot #16826

alexcrichton opened this issue Aug 28, 2014 · 2 comments · Fixed by #16838
Labels
A-DSTs Area: Dynamically-sized types (DSTs)

Comments

@alexcrichton
Copy link
Member

cc @nick29581, this happened twice in a row, so perhaps there's an actual bug?

The full log is here: http://buildbot.rust-lang.org/builders/snap3-bsd/builds/19/steps/test/logs/stdio, the excerpt is:

failures:

---- [run-pass] run-pass/dst-dtor-2.rs stdout ----

    error: test run failed!
    status: signal: 11
    command: x86_64-unknown-freebsd/test/run-pass/dst-dtor-2.stage2-x86_64-unknown-freebsd 
    stdout:
    ------------------------------------------

    ------------------------------------------
    stderr:
    ------------------------------------------

    ------------------------------------------

    task '[run-pass] run-pass/dst-dtor-2.rs' failed at 'explicit failure', /usr/home/rustbuild/src/rust-buildbot/slave/snap3-bsd/build/src/compiletest/runtest.rs:1327

Currently this is blocking a new snapshot :(

@nrc
Copy link
Member

nrc commented Aug 28, 2014

Do we have history from the build bots? When did it start failing? Presumably it was passing when it landed, or might it have landed broken somehow?

@eddyb
Copy link
Member

eddyb commented Aug 29, 2014

Using the nightly, on linux:

eddy@eddy-laptop ~/P/rust> rustc src/test/run-pass/dst-dtor-2.rs -o dst-dtor-2 -g
src/test/run-pass/dst-dtor-2.rs:21:5: 21:9 warning: code is never used: `f`, #[warn(dead_code)] on by default
src/test/run-pass/dst-dtor-2.rs:21     f: T
                                       ^~~~
eddy@eddy-laptop ~/P/rust> ./dst-dtor-2 
eddy@eddy-laptop ~/P/rust> valgrind ./dst-dtor-2 
==21563== Memcheck, a memory error detector
==21563== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==21563== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info
==21563== Command: ./dst-dtor-2
==21563== 
==21563== Invalid free() / delete / delete[] / realloc()
==21563==    at 0x1880E8: je_valgrind_freelike_block (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==    by 0x1121E8: heap::imp::deallocate::he997a48b3c1ea8ccwfa (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==    by 0x112164: heap::deallocate::h3255d78e44a8dac82ea (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==    by 0x1120F9: heap::exchange_free::hf43d197ec176b23aEea (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==    by 0x111F49: Box$LT$Fat$LT$$x5bFoo$x5d$GT$$GT$::glue_drop.1137::ha3d3461cb44cbb67 (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==    by 0x111B42: main::ha83750fb0f5236b6Kaa (dst-dtor-2.rs:26)
==21563==    by 0x1490A2: start::closure.8430 (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==    by 0x16199B: rust_try_inner (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==    by 0x161985: rust_try (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==    by 0x15EFC2: unwind::try::h03d8d1d4cb0de0c1f7d (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==    by 0x15EDCE: task::Task::run::hafab6bcab45e61e5zdd (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==    by 0x148F19: start::h23cb512b711cdb87ooe (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==  Address 0x6014048 is 0 bytes inside a block of size 8 free'd
==21563==    at 0x1880E8: je_valgrind_freelike_block (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==    by 0x1121E8: heap::imp::deallocate::he997a48b3c1ea8ccwfa (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==    by 0x112164: heap::deallocate::h3255d78e44a8dac82ea (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==    by 0x1120F9: heap::exchange_free::hf43d197ec176b23aEea (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==    by 0x11205C: _$x5bFoo$x5d::glue_drop.1143::h658b915e24b0db1d (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==    by 0x111F97: Fat$LT$$x5bFoo$x5d$GT$::glue_drop.1140::h2d3c9ca8436fb1fb (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==    by 0x111F1E: Box$LT$Fat$LT$$x5bFoo$x5d$GT$$GT$::glue_drop.1137::ha3d3461cb44cbb67 (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==    by 0x111B42: main::ha83750fb0f5236b6Kaa (dst-dtor-2.rs:26)
==21563==    by 0x1490A2: start::closure.8430 (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==    by 0x16199B: rust_try_inner (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==    by 0x161985: rust_try (in /home/eddy/Projects/rust/dst-dtor-2)
==21563==    by 0x15EFC2: unwind::try::h03d8d1d4cb0de0c1f7d (in /home/eddy/Projects/rust/dst-dtor-2)
==21563== 
==21563== 
==21563== HEAP SUMMARY:
==21563==     in use at exit: 0 bytes in 0 blocks
==21563==   total heap usage: 12 allocs, 13 frees, 648 bytes allocated
==21563== 
==21563== All heap blocks were freed -- no leaks are possible
==21563== 
==21563== For counts of detected and suppressed errors, rerun with: -v
==21563== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2)

nrc added a commit to nrc/rust that referenced this issue Aug 29, 2014
Thanks to @eddyb for finding the bug.

Closes rust-lang#16826 (I hope)
bors added a commit that referenced this issue Aug 29, 2014
Don't double free embedded, unsized slices.

Merge/rebase error from DST. Thanks to @eddyb for finding.

Closes #16826 (I hope)

r?
bors added a commit to rust-lang-ci/rust that referenced this issue Mar 17, 2024
fix: incorrect handling of `use` and panic issue in `extract_module`.

fix rust-lang#16826

This PR includes the following changes:

1. Simplify the implementation partially, removing many unnecessary loops and `clone()`.

2. When it is found that the top level of the selection contains a `use` statement, a copy of the `use` will be reinserted before extraction. (rust-lang#16826)

3. Fixed an issue during `extract_module`, where if the top level of the selected part contains `A` and `use A::B`, it caused a duplication of `use A`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-DSTs Area: Dynamically-sized types (DSTs)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants