-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Add diagnostic explaining STATUS_STACK_BUFFER_OVERRUN not only being used for stack buffer overruns if link.exe exits with that exit code #141828
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
Conversation
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
Some changes occurred in compiler/rustc_codegen_ssa |
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.
This looks good to me but I wonder if we should include some mention of the fail fast status code (and where to find it) like:
note: consider checking the Event Log for Windows Error Reporting events to see the fail fast error code
This comment has been minimized.
This comment has been minimized.
used for stack buffer overruns if link.exe exits with that exit code `STATUS_STACK_BUFFER_OVERRUN` is also used for fast abnormal program termination, e.g. by abort(). Emit a special diagnostic to let people know that this most likely doesn't indicate a stack buffer overrun.
fd5dcde
to
7e5acb9
Compare
Added that now - I couldn't figure out how to add two notes via derive macros though, so I replaced them with a manual |
Thanks @Fulgen301! @bors r+ rollup |
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
Rollup of 23 pull requests Successful merges: - #141658 (rustdoc search: prefer stable items in search results) - #141828 (Add diagnostic explaining STATUS_STACK_BUFFER_OVERRUN not only being used for stack buffer overruns if link.exe exits with that exit code) - #144823 (coverage: Extract HIR-related helper code out of the main module) - #144883 (Remove unneeded `drop_in_place` calls) - #144923 (Move several more float tests to floats/mod.rs) - #144988 (Add annotations to the graphviz region graph on region origins) - #145010 (Couple of minor abi handling cleanups) - #145017 (Explicitly disable vector feature on s390x baseline of bad-reg test) - #145027 (Optimize `char::is_alphanumeric`) - #145050 (add member constraints tests) - #145073 (update enzyme submodule to handle llvm 21) - #145080 (Escape diff strings in MIR dataflow graphviz) - #145082 (Fix some bad formatting in `-Zmacro-stats` output.) - #145083 (Fix cross-compilation of Cargo) - #145096 (Fix wasm target build with atomics feature) - #145097 (remove unnecessary `TypeFoldable` impls) - #145100 (Rank doc aliases lower than equivalently matched items) - #145103 (rustc_metadata: remove unused private trait impls) - #145115 (defer opaque type errors, generally greatly reduce tainting) - #145119 (rustc_public: fix missing parenthesis in pretty discriminant) - #145124 (Recover `for PAT = EXPR {}`) - #145132 (Refactor map_unit_fn lint) - #145134 (Reduce indirect assoc parent queries) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 23 pull requests Successful merges: - #141658 (rustdoc search: prefer stable items in search results) - #141828 (Add diagnostic explaining STATUS_STACK_BUFFER_OVERRUN not only being used for stack buffer overruns if link.exe exits with that exit code) - #144823 (coverage: Extract HIR-related helper code out of the main module) - #144883 (Remove unneeded `drop_in_place` calls) - #144923 (Move several more float tests to floats/mod.rs) - #144988 (Add annotations to the graphviz region graph on region origins) - #145010 (Couple of minor abi handling cleanups) - #145017 (Explicitly disable vector feature on s390x baseline of bad-reg test) - #145027 (Optimize `char::is_alphanumeric`) - #145050 (add member constraints tests) - #145073 (update enzyme submodule to handle llvm 21) - #145080 (Escape diff strings in MIR dataflow graphviz) - #145082 (Fix some bad formatting in `-Zmacro-stats` output.) - #145083 (Fix cross-compilation of Cargo) - #145096 (Fix wasm target build with atomics feature) - #145097 (remove unnecessary `TypeFoldable` impls) - #145100 (Rank doc aliases lower than equivalently matched items) - #145103 (rustc_metadata: remove unused private trait impls) - #145115 (defer opaque type errors, generally greatly reduce tainting) - #145119 (rustc_public: fix missing parenthesis in pretty discriminant) - #145124 (Recover `for PAT = EXPR {}`) - #145132 (Refactor map_unit_fn lint) - #145134 (Reduce indirect assoc parent queries) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #141828 - Fulgen301:status-stack-buffer-overrun-diagnostic, r=wesleywiser Add diagnostic explaining STATUS_STACK_BUFFER_OVERRUN not only being used for stack buffer overruns if link.exe exits with that exit code `STATUS_STACK_BUFFER_OVERRUN` is also used for fast abnormal program termination, e.g. by abort(). Emit a special diagnostic to let people know that this most likely doesn't indicate a stack buffer overrun. This doesn't look up the crash report in the event log to determine what the fast fail error code is. This is due to the way crashes are logged: When a process crash happens, the system logs an "Application Error" event, which contains the exit code and the process ID, but not the fast fail error code. A second event by Windows Error Reporting does contain that fast fail code, but not the process ID - but that event is not emitted at process exit, but when WER has dealt with it (on my system, it happens roughly two seconds later), so querying the code would have to read the `IntegratorReportId`, wait two seconds or potentially longer for the WER event with the same `ReportID`, and read out the code. (Also, that second event doesn't happen if WER is disabled.) Fixes #100519.
Hi bors this already merged |
but what if I am bors |
STATUS_STACK_BUFFER_OVERRUN
is also used for fast abnormal program termination, e.g. by abort(). Emit a special diagnostic to let people know that this most likely doesn't indicate a stack buffer overrun.This doesn't look up the crash report in the event log to determine what the fast fail error code is. This is due to the way crashes are logged: When a process crash happens, the system logs an "Application Error" event, which contains the exit code and the process ID, but not the fast fail error code. A second event by Windows Error Reporting does contain that fast fail code, but not the process ID - but that event is not emitted at process exit, but when WER has dealt with it (on my system, it happens roughly two seconds later), so querying the code would have to read the
IntegratorReportId
, wait two seconds or potentially longer for the WER event with the sameReportID
, and read out the code. (Also, that second event doesn't happen if WER is disabled.)Fixes #100519.