You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hiredis version = 0.11.0
OS = Debian GNU/Linux 11 (bullseye)
Redis server v=6.0.16 sha=00000000:0 malloc=jemalloc-5.2.1 bits=64 build=6d95e1af3a2c082a
Scenario ==> Inserting data into redis DB ...Called from one of the unit test [googletest] Command ==> "HSET <some_key> state off"
Stack Trace
Program received signal SIGSEGV, Segmentation fault.
__redisAppendCommand (c=0x0,
cmd=0x4daf10 "*4\r\n$4\r\nHSET\r\n$20\r\nsome_key\r\n$5\r\nstate\r\n$3\r\noff\r\n", len=61)
at hiredis.c:1186
1186 newbuf = sdscatlen(c->obuf,cmd,len);
(gdb) bt
#0 __redisAppendCommand (c=0x0,
cmd=0x4daf10 "*4\r\n$4\r\nHSET\r\n$20\r\nsome_key\r\n$5\r\nstate\r\n$3\r\noff\r\n", len=61)
at hiredis.c:1186 #1 0x00007fffff6f461c in redisvAppendCommand (c=0x0, format=, ap=) at hiredis.c:1206 #2 0x00007fffff6f4792 in redisvCommand (c=0x0, format=, ap=ap@entry=0x7ffffffed498) at hiredis.c:1267 #3 0x00007fffff6f4847 in redisCommand (c=,
format=format@entry=0x4dc530 "HSET runtime.status.comms state off") at hiredis.c:1276
The text was updated successfully, but these errors were encountered:
Looks like you aren't making redisConnect is returning a valid context as c=0x0.
So you've got a NULLredisContext making redisContext->obuf just 0 + the offset of that member, which if course is not a valid sds string 😄
I can't help much more than that without a bit of code that reproduces the issue. Fix should be simple though. Just make sure redisConnect is returning a valid pointer and c->err is not set.
Hiredis version = 0.11.0
OS = Debian GNU/Linux 11 (bullseye)
Redis server v=6.0.16 sha=00000000:0 malloc=jemalloc-5.2.1 bits=64 build=6d95e1af3a2c082a
Scenario ==> Inserting data into redis DB ...Called from one of the unit test [googletest]
Command ==> "HSET <some_key> state off"
Stack Trace
Program received signal SIGSEGV, Segmentation fault.
__redisAppendCommand (c=0x0,
cmd=0x4daf10 "*4\r\n$4\r\nHSET\r\n$20\r\nsome_key\r\n$5\r\nstate\r\n$3\r\noff\r\n", len=61)
at hiredis.c:1186
1186 newbuf = sdscatlen(c->obuf,cmd,len);
(gdb) bt
#0 __redisAppendCommand (c=0x0,
cmd=0x4daf10 "*4\r\n$4\r\nHSET\r\n$20\r\nsome_key\r\n$5\r\nstate\r\n$3\r\noff\r\n", len=61)
at hiredis.c:1186
#1 0x00007fffff6f461c in redisvAppendCommand (c=0x0, format=, ap=) at hiredis.c:1206
#2 0x00007fffff6f4792 in redisvCommand (c=0x0, format=, ap=ap@entry=0x7ffffffed498) at hiredis.c:1267
#3 0x00007fffff6f4847 in redisCommand (c=,
format=format@entry=0x4dc530 "HSET runtime.status.comms state off") at hiredis.c:1276
The text was updated successfully, but these errors were encountered: