oxidecomputer / hubris

A lightweight, memory-protected, message-passing kernel for deeply embedded systems.
Mozilla Public License 2.0
3.04k stars 180 forks source link

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

Open cbiffle opened 1 week ago

cbiffle commented 1 week ago

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.