-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
feat: check ARG_MAX on Unix platforms #138439
Conversation
Some changes occurred in compiler/rustc_codegen_ssa |
This comment has been minimized.
This comment has been minimized.
9934c6d
to
b4e66b7
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
You probably need to declare a |
This comment has been minimized.
This comment has been minimized.
|
I would consider restructuring this bit like #[cfg(windows)]
{
// but make sure this returns
}
#[cfg(unix)]
{
// but make sure this returns
}
false to avoid having both the |
Helping @weihanglo work on this |
☔ The latest upstream changes (presumably #138480) made this pull request unmergeable. Please resolve the merge conflicts. |
This also updates the estimate on Windows of the length argument list to `saturating_add` to avoid overflow.
Though I doubt anyone running rustc outside Unix/Windows
On Unix the limits can be gargantuan anyway so we're pretty unlikely to hit them, but might still exceed it. We consult ARG_MAX here to get an estimate.
@rustbot ready |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@bors r+ rollup |
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#138283 (Enforce type of const param correctly in MIR typeck) - rust-lang#138439 (feat: check ARG_MAX on Unix platforms) - rust-lang#138502 (resolve: Avoid some unstable iteration) - rust-lang#138514 (Remove fake borrows of refs that are converted into non-refs in `MakeByMoveBody`) - rust-lang#138524 (Mark myself as unavailable for reviews temporarily) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#138439 - weihanglo:argmax, r=jieyouxu feat: check ARG_MAX on Unix platforms On Unix the limits can be gargantuan anyway so we're pretty unlikely to hit them, but might still exceed it. We consult ARG_MAX here to get an estimate. Fixes rust-lang#138421 r? `@jieyouxu`
On Unix the limits can be gargantuan anyway so we're pretty unlikely to hit them, but might still exceed it.
We consult ARG_MAX here to get an estimate.
Fixes #138421
r? @jieyouxu