Running srd_decoder_load_all() will segfault if srd_init() hasn't run beforehand. This is documented in the API docs, though it would still be nice if the function returned SRD_ERR_LIB_UNINITIALIZED or such instead of segfaulting. The same probably applies to various other API calls (they should SRD_ERR_LIB_UNINITIALIZED as needed). This was exposed by the libsigrokdecode testsuite.
Fixed the bug AND the test!