-
Notifications
You must be signed in to change notification settings - Fork 6k
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
samples: bluetooth: central_iso: unchecked buffer allocation #72699
Comments
Please provide details on how to build and test in the
Lowering the priority of the issue, as steps to reproduce is unclear. |
It looks like related/introduced to/by #71697 |
Yep. A bunch of (mostly audio or iso-related) samples do this. Samples should've been programmed better, and not block the whole syswq by allocating with Note that getting |
Describe the bug
In
central_iso
sample (functioniso_timer_timeout
), no check on buffer allocation failure is performed.See code snippet:
zephyr/samples/bluetooth/central_iso/src/main.c
Lines 62 to 68 in d9b3ffa
As a consequence, a system crash is observed when buffer allocation fails.
To Reproduce
Not so easy to reproduce and it depends on the buffer allocation policy.
Error observed while running a new platform against Nordic nRF52840 board.
Expected behavior
Sample should be robust against buffer allocation failure, e.g. throwing an error or a warning an retrying.
Impact
Annoyance, especially when validating new platform prone to have genuine bugs.
Logs and console output
Zephyr crash log.
Environment (please complete the following information):
Additional context
Actually, from quick check, having
K_FOREVER
as timeout should avoid to getNULL
as return value, but indeed this observed.The text was updated successfully, but these errors were encountered: