[riot-notifications] [RIOT-OS/RIOT] pkg/nimble: migrate to ztimer (#16317)

Hauke Petersen 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:
https://github.com/RIOT-OS/RIOT/pull/16317#issuecomment-819608915
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210414/406f6c18/attachment.htm>


More information about the notifications mailing list