Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bootstrap: Don't get output iflldb --version errors#127112

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
bors merged 2 commits intorust-lang:masterfromChrisDenton:lldb
Jun 29, 2024

Conversation

@ChrisDenton
Copy link
Member

fixes#126892

Command can error in two ways: the OS can fail to run the binary at all or else the binary can return an error exit code. Unfortunately the distinction between the two is not clear cut. The OS may succeed in starting the binary but it may still error beforemain (e.g. if a necessary library fails to load) and this will be reported via the exit code.

Fortunately this case is simpler. We can assume thatlldb --version will only ever error if there's a startup issue of some kind. so both kinds of errors are caused by the OS. Thus it's safe for us to treat them equally for the sake of this specific check.

jieyouxu reacted with thumbs up emoji
@rustbot
Copy link
Collaborator

r?@Kobzol

rustbot has assigned@Kobzol.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

User? to explicitly pick a reviewer

@rustbotrustbot added S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties. T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labelsJun 29, 2024
@Kobzol
Copy link
Member

I don't understand how this fixes the crash. It seems just to change the returned error? The original issue showed a crash on line1820, inside therun function, but that isn't used in thislldb invocation. It is probably crashing elsewhere (?) :) Probably line 1841.

@ChrisDenton
Copy link
MemberAuthor

ChrisDenton commentedJun 29, 2024
edited
Loading

Sorry, I didn't explain that very well. The code is a bit spaghetti but therun function is only invoked after thelldb --version is, It's guarded by theif let Some(ref vers) = lldb_version { block.

Andlldb --version already fails but we don't actually check the exit status before reading the output oflldb --version so we're getting nonsense. Well probablySome("") because it doesn't print anything.

@ChrisDenton
Copy link
MemberAuthor

I've pushed a new commit that hopefully makes the code a bit clearer.

@Kobzol
Copy link
Member

Aah, I understand now, thanks! Yeah, this command invocation code is very messy. I will nuke it soon (probably in the next couple of days) anyway with my bootstrap command refactoring PRs. But it doesn't hurt to fix the issue for now, it will help me understand the intent of the original code better.

Thanks!

@bors rollup r+

ChrisDenton reacted with thumbs up emoji

@bors
Copy link
Collaborator

📌 Commita6ef91e has been approved byKobzol

It is now in thequeue for this repository.

@borsbors added S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties. labelsJun 29, 2024
@ChrisDenton
Copy link
MemberAuthor

I will nuke it soon (probably in the next couple of days) anyway with my bootstrap command refactoring PRs.

That'll be great!

bors added a commit to rust-lang-ci/rust that referenced this pull requestJun 29, 2024
…llaumeGomezRollup of 7 pull requestsSuccessful merges: -rust-lang#126805 (Migrate `pdb-alt-path`, `mismatching-target-triples` and `mingw-export-call-convention` `run-make` tests to rmake) -rust-lang#126995 (Migrate `pretty-print-with-dep-file`, `pretty-print-to-file` and `libtest-padding` `run-make` tests to rmake) -rust-lang#127041 (Migrate `run-make/override-aliased-flags` to `rmake.rs`) -rust-lang#127072 (docs: say "includes" instead of "does include") -rust-lang#127073 (Remove unnecessary SeqCst in `impl fmt::Pointer for AtomicPtr`) -rust-lang#127112 (Bootstrap: Don't get output if `lldb --version` errors) -rust-lang#127116 (Migrate `run-make/return-non-c-like-enum` to `rmake.rs`)Failed merges: -rust-lang#127050 (Make mtime of reproducible tarballs dependent on git commit)r? `@ghost``@rustbot` modify labels: rollup
@borsbors merged commit38983df intorust-lang:masterJun 29, 2024
@rustbotrustbot added this to the1.81.0 milestoneJun 29, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull requestJun 29, 2024
Rollup merge ofrust-lang#127112 - ChrisDenton:lldb, r=KobzolBootstrap: Don't get output if `lldb --version` errorsfixesrust-lang#126892`Command` can error in two ways: the OS can fail to run the binary at all or else the binary can return an error exit code. Unfortunately the distinction between the two is not clear cut. The OS may succeed in starting the binary but it may still error before `main` (e.g. if a necessary library fails to load) and this will be reported via the exit code.Fortunately this case is simpler. We can assume that `lldb --version` will only ever error if there's a startup issue of some kind. so both kinds of errors are caused by the OS. Thus it's safe for us to treat them equally for the sake of this specific check.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@KobzolKobzol

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Milestone

1.81.0

Development

Successfully merging this pull request may close these issues.

Bootstrap panics if lldb fails to start

4 participants

@ChrisDenton@rustbot@Kobzol@bors

[8]ページ先頭

©2009-2025 Movatter.jp