[riot-notifications] [RIOT-OS/RIOT] pkg/nimble: migrate to ztimer (#16317)
notifications at github.com
Wed Apr 14 17:29:28 CEST 2021
Took a while but I think I found the issue:
- in https://github.com/apache/mynewt-nimble/pull/883 the pseudo random number generator for nimble was switched from using the stdlibs `rand()` to `jrand48()`
- the function wrapping this call (`ble_ll_rand()`) is called not only from thread context, but as it seems under some circumstances also from interrupt context
- the seeding for `jrand48()` is done during late initialization, done the first time `ble_ll_rand()` is called
- it seems that the first ever call to jrand48() triggers a `malloc` call
- if this initial call happens to be run in interrupt context, we get the failed assertion triggered by `malloc_thread_safe`
So much for the observed hard fault, now towards verifying and fixing it :-)
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications