Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upstack overflow in rust-brotli #36778
Comments
This comment has been minimized.
This comment has been minimized.
danielrh
commented
Sep 27, 2016
|
I got distracted for several months, so this test had not been running since early July |
This comment has been minimized.
This comment has been minimized.
|
I get the stack overflow also on |
TimNN
added
the
regression-from-stable-to-beta
label
Sep 27, 2016
This comment has been minimized.
This comment has been minimized.
|
I can reproduce this as early as Also seems to be related to mir since on eg. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
cc @pcwalton |
TimNN
added
regression-from-stable-to-stable
and removed
regression-from-stable-to-beta
regression-from-stable-to-nightly
labels
Sep 29, 2016
This comment has been minimized.
This comment has been minimized.
|
I bumped into this too: https://travis-ci.org/khernyo/zopfli-rs/jobs/98794028 |
This comment has been minimized.
This comment has been minimized.
|
You can find a minimized version at https://github.com/khernyo/rust-issue-36778 Basically it boils down to the following code, but the stack overflow only manifests when it's run using fn main() {
let child = std::thread::spawn(|| {
std::cell::RefCell::new([0i8; 232500]);
});
child.join().unwrap();
}The first rust commit which seems to causes the stack overflow is ee977e7 |
This comment has been minimized.
This comment has been minimized.
|
Yeah that's MIR alright - if you double the array size it also breaks before the switch to MIR, right? |
This comment has been minimized.
This comment has been minimized.
|
Yes, that's right. |
This comment has been minimized.
This comment has been minimized.
|
@khernyo thanks for minimizing that! =) |
This comment has been minimized.
This comment has been minimized.
|
OK, so, maybe this clear to @eddyb, but I did a little bit of digging into the MIR for the case in question. It sort of seems to me it's doing the right thing -- am I missing something? In particular, the MIR for the closure looks like (modified to only use the type [i8;22], sorry):
The problem here is that |
This comment has been minimized.
This comment has been minimized.
|
The problem is not with the closure, but with |
This comment has been minimized.
This comment has been minimized.
|
For the record, the MIR for
|
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis This is why I want MIR optimizations to always run. |
brson
referenced this issue
Oct 6, 2016
Closed
rustc built by MIR overflows its stack for crates with very deep ASTs. #35408
This comment has been minimized.
This comment has been minimized.
|
Closing in favor of #35408 |
nikomatsakis commentedSep 27, 2016
•
edited
This commit in rust-brotli:
dropbox/rust-brotli@e580fea
fixes a stack overflow that started occurring recently with nightly builds. Perhaps related to #35408?
@danielrh, do you always test against the most recent nightly, or do you only upgrade nightly periodically? I am trying to narrow down when this stack overflow may have started to occur.