Invoking mqtt_publish without being in a connected state gives a negative return value. Passing this return value into mqtt_error_str causes a SEGV.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff756a35c in mqtt_error_str (error=-1094795586) at /usr/local/src/mqtt-c/src/mqtt.c:1773
1773 return MQTT_ERRORS_STR[offset];
Unfortunately MQTT_CLIENT_TRY_PACK is a macro so cannot get better backtrace without replacing it with a function.
Invoking
mqtt_publish
without being in a connected state gives a negative return value. Passing this return value intomqtt_error_str
causes a SEGV.Unfortunately
MQTT_CLIENT_TRY_PACK
is a macro so cannot get better backtrace without replacing it with a function.