-
Notifications
You must be signed in to change notification settings - Fork 2.1k
sys/test_utils/print_stack_usage: work with small stacks #17891
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
Conversation
fjmolinas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
|
Instead of making the code more cluttered with ? |
Because it changes the test. (And, picolibc |
maribu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline. I wonder if we should just let it depend on fmt, though.
Somewhat unrelated: I always wanted to start using fmt in the panic handlers (at least for newlib). Because the very moment the panic handler uses printf I get an "ISR stack overflown", but that was caused by the panic handler's use of printf. If that would get upstream, there would be fmt anyway whenever newlib is used.
I thought about it, but it does add >200 bytes to ROM is fmt is not used otherwise. Which would in turn kick tests over the limit. |
+1 I think since this is a utility it's good to make it just use what is available, and not have it change the footprint of an application outside of the code size added by the function itself. |
84f6298 to
480ed47
Compare
Contribution description
#17706 introduced printing of stack metrics. But, it printed them in the exiting thread, causing stack overflows due to
printf(), for very small stacks.This PR fixes the issue two-fold:
print_str()is used, iffmtis linked in.Testing procedure
Issues/PRs references