Crash- Segmentation fault in sdscatlen-> sdsMakeRoomFor -> realloc
Application crashed due to a segmentation fault while processing Redis DB events.
libhiredis version: 0.14.1-1 Distribution: Bullseye
(gdb) bt #0 0x00007f932b1139b0 in ?? () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x00007f932b116615 in ?? () from /lib/x86_64-linux-gnu/libc.so.6 #2 0x00007f932b1178d6 in realloc () from /lib/x86_64-linux-gnu/libc.so.6 #3 0x00007f934938c2df in sdsMakeRoomFor () from /usr/lib/x86_64-linux-gnu/libhiredis.so.0.14 #4 0x00007f934938cbb4 in sdscatlen () from /usr/lib/x86_64-linux-gnu/libhiredis.so.0.14 #5 0x00007f9349389db0 in redisvFormatCommand () from /usr/lib/x86_64-linux-gnu/libhiredis.so.0.14
Any more details of the arguments in frame 3, 4 and 5?
We'd need more context to make a guess, really. A program that reproduces the problem would be most ideal, but short of that you could try catching it in a recording debuger like rr. Failing that, info about the arguments would be very helpful as well.
libhiredis version: 0.14.1-1
It's also a really old version of hiredis.
Without more context, there's not much we can do to help track this down.
If you're still encountering this crash you could try to run your program under valgrind or build it with sanitizers to see if there is corruption occuring elsewhere.