Increase the default stack size to 16 MiB and remove ensure_sufficient_stack - #160535
Increase the default stack size to 16 MiB and remove ensure_sufficient_stack#160535ChrisDenton wants to merge 5 commits into
ensure_sufficient_stack#160535Conversation
|
Some changes occurred in match checking cc @Nadrieril Some changes occurred in match lowering cc @Nadrieril changes to the core type system cc @lcnr These commits modify the If this was unintentional then you should revert the changes before this PR is merged. The parser was modified, potentially altering the grammar of (stable) Rust cc @fmease Some changes occurred to the CTFE machinery Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred in exhaustiveness checking cc @Nadrieril |
|
rustbot has assigned @petrochenkov. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
Oh that pinged everyone, sorry. It does touch a lot of files but most of the +/- diff is whitespace changes. |
ensure_sufficient_stack
This comment has been minimized.
This comment has been minimized.
6f4f307 to
39e551e
Compare
This comment has been minimized.
This comment has been minimized.
39e551e to
5b3365e
Compare
|
The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging. cc @davidtwco, @BoxyUwU |
This comment has been minimized.
This comment has been minimized.
4b5f459 to
8f4397d
Compare
There was a problem hiding this comment.
This test is fairly recent but I'm not sure that this it is still useful. It's basically testing the use of stacker, which is obsolete now.
There was a problem hiding this comment.
I suspect that this test might start failing again with increased scale of the test (e.g. if N=8000 fails at 3MiB, then at N=45000 it would fail at 16MiB.) But maybe making the scale here large enough makes the code itself impractical in other ways? 🤷
There was a problem hiding this comment.
One thing I'm finding with these high recursion cases is that they start becoming very slow even before they approach the (new) stack limit. So we could increase the stack size further if there's a real world use case (which I don't see atm but not ruling out) but I think that might be sweeping the problem under the rug. I do feel that at the very least we should be warning about it if not treating it as a bug to be fixed.
8f4397d to
a4e65d7
Compare
This comment has been minimized.
This comment has been minimized.
| "windows_i686_msvc", | ||
| "windows_x86_64_gnu", | ||
| "windows_x86_64_gnullvm", | ||
| "windows_x86_64_msvc", |
|
Hm, I don't personally feel it needs an FCP in addition to the MCP but if someone thinks it should then I'm happy either way. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
d536b40 to
967f720
Compare
|
PR CI is green. Let's see what the full CI says @bors r=petrochenkov |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
💔 Test for 145c517 failed: CI. Failed job:
|
|
I guess some stack overflow regression test is not regressing anymore. Does that succeed spuriously (so it's close to the 16 MiB boundary?) or is it generally fixed? |
It succeeds on some runners but fails on others. I guess due to the particular optimisations they use. My thought is that doing mathematics in the type system is weird enough that asking the user to set In short I don't think this is a bug any more under the new system because the user now has options rather than needing us to fix it. |
|
makes sense. Could turn it into a ui test with more stack or just remove it. Either way, can mark the issue as fixed by this PR. |
|
r=me with the crash test handled $somehow |
This crash test was for a bug in our use of `ensure_sufficient_stack`. Since that has now been removed, this test is redundant. Users can use the `RUST_MIN_STACK` environment variable instead if the default stack isn't sufficient.
967f720 to
402237c
Compare
|
I've removed it but if this merges then I'll comment on the original issue. @bors r=petrochenkov,oli-obk |
View all comments
Tracking issue: #160275
Fixes #93237
Fixes #108499