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

build/util: prevent infinite loop if target/ not found #1936

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

cbiffle
Copy link
Collaborator

@cbiffle cbiffle commented Nov 25, 2024

Previously, if you attempted to use certain functions in the build_util crate...and your output directory happened to not include any parent directories with the exact name "target"...

...the build script would burn 100% of a core forever, until you killed it.

This doesn't affect Hubris-proper but does affect out of tree builds. The original code was arguably wrong anyway, so, this fixes that.

Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops! good catch!

Previously, if you attempted to use certain functions in the build_util
crate...and your output directory happened to not include any parent
directories with the exact name "target"...

...the build script would burn 100% of a core forever, until you killed
it.

This doesn't affect Hubris-proper but _does_ affect out of tree builds.
The original code was arguably wrong anyway, so, this fixes that.
@cbiffle cbiffle force-pushed the cbiffle/build-util-infinite-loop branch from 32d7585 to a5a0335 Compare December 10, 2024 21:46
@cbiffle cbiffle enabled auto-merge (rebase) December 10, 2024 21:46
@cbiffle cbiffle merged commit 2c8ac9b into master Dec 10, 2024
125 checks passed
@cbiffle cbiffle deleted the cbiffle/build-util-infinite-loop branch December 10, 2024 21:53
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.

3 participants