Skip to content
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

Segfault in unstable::lang::return_to_mut #5517

Closed
bblum opened this issue Mar 23, 2013 · 0 comments
Closed

Segfault in unstable::lang::return_to_mut #5517

bblum opened this issue Mar 23, 2013 · 0 comments
Labels
A-lifetimes Area: lifetime related A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows A-typesystem Area: The type system I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

Comments

@bblum
Copy link
Contributor

bblum commented Mar 23, 2013

Found this while attempting to reproduce #3039. This code crashes:

fn main() {
    let box1 = @mut 42; 
    let _x = *(&mut *box1) == 42 || *(&mut *box1) == 31337;
}

This is as minimal as I can make it. Removing the second clause of the || makes it not crash. Changing the || to a && makes it not crash.

The backtrace is:

#0  0x00000000004011f8 in unstable::lang::return_to_mut::_a65ca8bc2b2b29c3::_00 ()
#1  0x0000000000400c07 in main::_eaf8b750790f65::_00 ()
#2  0x0000000000400e1e in _rust_main ()
#3  0x00007ffff74833b4 in task_start_wrapper (a=<optimized out>)
    at /home/bblum/rust/src/rt/rust_task.cpp:162
#4  0x0000000000000000 in ?? ()

It crashes where it is trying to read (*a).header.ref_count because a is a null pointer.

bors added a commit that referenced this issue May 7, 2013
…nger

It appears the cause of #5517 was fixed in 0dc6c41, so adding a test so the issue can be closed.
oli-obk pushed a commit to oli-obk/rust that referenced this issue May 2, 2020
…hearth

Deploy time travel

Since not only commits to the master branch, but also tags and the beta branch are deployed, we have to be cautious which version of the deploy script is used. GHA always runs the workflow that is commited on the `ref`, that gets tested. For tagged commits. this is 6 weeks outdated workflows/scripts. To prevent this, this workflow first checks out the deploy.sh script, the website templates and all python scripts generating files for the website.

changelog: none
oli-obk pushed a commit to oli-obk/rust that referenced this issue May 2, 2020
Rollup of 5 pull requests

Successful merges:

 - rust-lang#5408 (Downgrade match_bool to pedantic)
 - rust-lang#5505 (Avoid running cargo+internal lints when not enabled)
 - rust-lang#5516 (Add a note to the beta sections of release.md)
 - rust-lang#5517 (Deploy time travel)
 - rust-lang#5523 (Add lifetime test case for `new_ret_no_self`)

Failed merges:

r? @ghost

changelog: rollup
flip1995 added a commit to flip1995/rust that referenced this issue Jul 29, 2021
…ednet,flip1995

Switch CI to new metadata collection

r? `@xFrednet`

Things we have to keep in mind:

- This removes the template files and the scripts used for deployment from the checkout. This was added in rust-lang#5517. I don't think we ever needed those there. Not sure though.
- ~~As a result, we can't remove the python scripts yet. We have to wait until this hits a stable Clippy release.~~ I'll just break the next stable deploy and do it by hand once.
- This should be merged together with rust-lang#7279. Me and `@xFrednet` will coordinate the switch
- ...?

I still have to try out some things:

- [x] Is it worth caching? Yes
- [x] ~~Is it worth to do a release build?~~ Nope
- [x] Does it actually work? With a few changes, yes
- [ ] ...?

changelog: Clippy now uses a lint to generate its documentation 🎉
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lifetimes Area: lifetime related A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows A-typesystem Area: The type system I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Projects
None yet
Development

No branches or pull requests

2 participants