This PR simplifies our canary system. This is possible now, because our stack-painting and stack-measuring got blazingly fast due to #302 #327 #331.
Adds work around for #323.
What
Before this PR there were two modes. By default probe-run would only paint 10% of stack and use that to detect potential stack-overflows. If a user would pass --measure-stack, probe-run would paint the whole stack (which was slow) and report the percentage of stack used, but don't notify about potential stack-overflows.
After this PR there is only a single mode. probe-run always paints the whole stack (which is fast), always reports the percentage of stack used and always reports potential stack-overflows.
The --measure-stack option is not completely removed to avoid a breaking change. But it does not do anything anymore except emitting a deprecation warning.
Some other drive-by changes:
assert subroutine requirements more early, therefore work around #323
refactor Settings to not need a lifetime
Testing
The unit testing[^1] and on-device tests[^2] succeed
Note to reviewer
While the whole PR got kinda big, the individual commits should be rather self-contained and therefore easier to review.
This PR simplifies our canary system. This is possible now, because our stack-painting and stack-measuring got blazingly fast due to #302 #327 #331.
Adds work around for #323.
What
Before this PR there were two modes. By default
probe-run
would only paint 10% of stack and use that to detect potential stack-overflows. If a user would pass--measure-stack
,probe-run
would paint the whole stack (which was slow) and report the percentage of stack used, but don't notify about potential stack-overflows.After this PR there is only a single mode.
probe-run
always paints the whole stack (which is fast), always reports the percentage of stack used and always reports potential stack-overflows.The
--measure-stack
option is not completely removed to avoid a breaking change. But it does not do anything anymore except emitting a deprecation warning.Some other drive-by changes:
Settings
to not need a lifetimeTesting
The unit testing[^1] and on-device tests[^2] succeed
Note to reviewer
While the whole PR got kinda big, the individual commits should be rather self-contained and therefore easier to review.
[^1]:
cargo test
[^2]:cargo test -- --ignored