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

std::os: pass the correct buffer size to windows calls. #12365

Closed
wants to merge 1 commit into from

Conversation

huonw
Copy link
Member

@huonw huonw commented Feb 18, 2014

Previously this was not passing the increased buffer size to the
closure (which normally contains a windows API call), so something that
was classed as too large for the buffer on the first call would be
always classed as too large, and would cause the program to loop
infinitely (or until OOM, since it was allocating double the memory at
each step).

Previously this was not passing the increased buffer size to the
closure (which normally contains a windows API call), so something that
was classed as too large for the buffer on the first call would be
always classed as too large, and would cause the program to loop
infinitely (or until OOM, since it was allocating double the memory at
each step).
@huonw
Copy link
Member Author

huonw commented Feb 18, 2014

I don't have a windows machine to test this so I don't actually know that the testcase I've given fails currently: it would be helpful if someone with a windows setup could run it (or this equivalent program) and see if it crashes. I've kicked off a try build to see if this actually fixes it (but I'll be asleep by the time it finishes).

@alexcrichton
Copy link
Member

I would r+, but it appears the try build failed :(

@huonw
Copy link
Member Author

huonw commented Feb 18, 2014

:(

I'm not going to be able to debug this myself, so I've opened #12376.

@huonw huonw closed this Feb 18, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 25, 2022
…-part-2, r=lnicola

Revert "internal: Try to publish the universal VSIX before the other ones"

Reverts rust-lang/rust-analyzer#12359
flip1995 pushed a commit to flip1995/rust that referenced this pull request Mar 7, 2024
[`unnecessary_cast`]: Avoid breaking precedence

 If the whole cast expression is a unary expression (`(*x as T)`) or an  addressof expression (`(&x as T)`), then not surrounding the suggestion  into a block risks us changing the precedence of operators if the cast  expression is followed by an operation with higher precedence than the  unary operator (`(*x as T).foo()` would become `*x.foo()`, which  changes what the `*` applies on).
The same is true if the expression encompassing the cast expression is a unary expression or an addressof expression.

The lint supports the latter case, but missed the former one. This PR fixes that.

Fixes rust-lang#11968

*Please write a short comment explaining your change (or "none" for internal only changes)*

changelog: [`unnecessary_cast`]: Avoid breaking precedence with unary operators (`(*x as T).foo()` --  before: `*x.foo()` -- now: `{*x}.foo()`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants