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

Print an error message and return instead of crash #3939

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

yuying-y
Copy link
Contributor

@yuying-y yuying-y commented Aug 6, 2024

When the address of a symbol couldn't be found, the app should return instead of crash. The address is validated by the caller, which returns false if address is NULL. Eventually the loader gets the error message, and reverts back to the previous good image.

b/357947368

Change-Id: I74b9aa600c281a74ef817af0cd97f0cda4ab91cd

@yuying-y
Copy link
Contributor Author

yuying-y commented Aug 6, 2024

Note that the loader does mark the slot as bad when reverting back to the previous image.

@yuying-y yuying-y requested review from y4vor and hlwarriner August 6, 2024 23:09
@hlwarriner
Copy link
Contributor

I think we should write a YTS Evergreen test case for this. I can file a feature request to track that, but let me know if you've already filed one / were planning to.

@yuying-y
Copy link
Contributor Author

yuying-y commented Aug 7, 2024

I think we should write a YTS Evergreen test case for this. I can file a feature request to track that, but let me know if you've already filed one / were planning to.

Yeah, I haven't. Feel free to file a request. It'll be hard to mock this scenario with YTS tho.

@yuying-y yuying-y added the cp-25.lts.1+ Cherry Pick to the 25.lts.1+ branch label Aug 7, 2024
@yuying-y yuying-y enabled auto-merge (squash) August 7, 2024 20:28
When the address of a symbol couldn't be found, the app should return
instead of crash. The address is validated by the caller, which returns
false if address is NULL. Eventually the loader gets the error message,
and reverts back to the previous good image.

b/357947368

Change-Id: I74b9aa600c281a74ef817af0cd97f0cda4ab91cd
@yuying-y yuying-y merged commit 7a23f54 into youtube:main Aug 8, 2024
320 of 322 checks passed
cobalt-github-releaser-bot pushed a commit that referenced this pull request Aug 8, 2024
When the address of a symbol couldn't be found, the app should return
instead of crash. The address is validated by the caller, which returns
false if address is NULL. Eventually the loader gets the error message,
and reverts back to the previous good image.

b/357947368

Change-Id: I74b9aa600c281a74ef817af0cd97f0cda4ab91cd
(cherry picked from commit 7a23f54)
@yuying-y yuying-y deleted the ld_crash branch August 8, 2024 02:48
yuying-y added a commit that referenced this pull request Aug 8, 2024
…ash (#3948)

Refer to the original PR: #3939

When the address of a symbol couldn't be found, the app should return
instead of crash. The address is validated by the caller, which returns
false if address is NULL. Eventually the loader gets the error message,
and reverts back to the previous good image.

b/357947368

Change-Id: I74b9aa600c281a74ef817af0cd97f0cda4ab91cd

Co-authored-by: yuying-y <[email protected]>
@yuying-y yuying-y added cp-23.lts.1+ Cherry Pick to the 23.lts.1+ branch cp-22.lts.1+ Cherry Pick to the 22.lts.1+ branch cp-24.lts.1+ Cherry Pick to the 24.lts.1+ branch labels Aug 8, 2024
cobalt-github-releaser-bot pushed a commit that referenced this pull request Aug 8, 2024
When the address of a symbol couldn't be found, the app should return
instead of crash. The address is validated by the caller, which returns
false if address is NULL. Eventually the loader gets the error message,
and reverts back to the previous good image.

b/357947368

Change-Id: I74b9aa600c281a74ef817af0cd97f0cda4ab91cd
(cherry picked from commit 7a23f54)
cobalt-github-releaser-bot pushed a commit that referenced this pull request Aug 8, 2024
When the address of a symbol couldn't be found, the app should return
instead of crash. The address is validated by the caller, which returns
false if address is NULL. Eventually the loader gets the error message,
and reverts back to the previous good image.

b/357947368

Change-Id: I74b9aa600c281a74ef817af0cd97f0cda4ab91cd
(cherry picked from commit 7a23f54)
cobalt-github-releaser-bot pushed a commit that referenced this pull request Aug 8, 2024
When the address of a symbol couldn't be found, the app should return
instead of crash. The address is validated by the caller, which returns
false if address is NULL. Eventually the loader gets the error message,
and reverts back to the previous good image.

b/357947368

Change-Id: I74b9aa600c281a74ef817af0cd97f0cda4ab91cd
(cherry picked from commit 7a23f54)
yuying-y added a commit that referenced this pull request Aug 8, 2024
…ash (#3952)

Refer to the original PR: #3939

When the address of a symbol couldn't be found, the app should return
instead of crash. The address is validated by the caller, which returns
false if address is NULL. Eventually the loader gets the error message,
and reverts back to the previous good image.

b/357947368

Change-Id: I74b9aa600c281a74ef817af0cd97f0cda4ab91cd

Co-authored-by: yuying-y <[email protected]>
yuying-y added a commit that referenced this pull request Aug 8, 2024
…ash (#3954)

Refer to the original PR: #3939

When the address of a symbol couldn't be found, the app should return
instead of crash. The address is validated by the caller, which returns
false if address is NULL. Eventually the loader gets the error message,
and reverts back to the previous good image.

b/357947368

Change-Id: I74b9aa600c281a74ef817af0cd97f0cda4ab91cd

Co-authored-by: yuying-y <[email protected]>
yuying-y added a commit that referenced this pull request Aug 9, 2024
…ash (#3953)

Refer to the original PR: #3939

When the address of a symbol couldn't be found, the app should return
instead of crash. The address is validated by the caller, which returns
false if address is NULL. Eventually the loader gets the error message,
and reverts back to the previous good image.

b/357947368

Change-Id: I74b9aa600c281a74ef817af0cd97f0cda4ab91cd

Co-authored-by: yuying-y <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cp-22.lts.1+ Cherry Pick to the 22.lts.1+ branch cp-23.lts.1+ Cherry Pick to the 23.lts.1+ branch cp-24.lts.1+ Cherry Pick to the 24.lts.1+ branch cp-25.lts.1+ Cherry Pick to the 25.lts.1+ branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants