RIOT
RIOT copied to clipboard
sys/event: add assertion that event has a handler
Contribution description
When an uninitialized event is added, we will dereference a NULL pointer. It can then be a bit tricky to find out which event caused this - so add an assertion when queuing the event that a callback is set.
Testing procedure
Issues/PRs references
Murdock results
:heavy_check_mark: PASSED
16c447afb1d1fbb540829aa43159aa235ac2cdcd gcoap: make use of event_callback_post()
| Success | Failures | Total | Runtime |
|---|---|---|---|
| 10193 | 0 | 10193 | 18m:19s |
Artifacts
A callback struct with a NULL handler does no harm in itself. Only when you try to add it to an event queue, things will blow up.