• M
    Fix sending uninitialized bytes · 4a36350d
    Matt Stancliff 提交于
    Fixes valgrind error:
    Syscall param write(buf) points to uninitialised byte(s)
       at 0x514C35D: ??? (syscall-template.S:81)
       by 0x456B81: clusterWriteHandler (cluster.c:1907)
       by 0x41D596: aeProcessEvents (ae.c:416)
       by 0x41D8EA: aeMain (ae.c:455)
       by 0x41A84B: main (redis.c:3832)
     Address 0x5f268e2 is 2,274 bytes inside a block of size 8,192 alloc'd
       at 0x4932D1: je_realloc (jemalloc.c:1297)
       by 0x428185: zrealloc (zmalloc.c:162)
       by 0x4269E0: sdsMakeRoomFor.part.0 (sds.c:142)
       by 0x426CD7: sdscatlen (sds.c:251)
       by 0x4579E7: clusterSendMessage (cluster.c:1995)
       by 0x45805A: clusterSendPing (cluster.c:2140)
       by 0x45BB03: clusterCron (cluster.c:2944)
       by 0x423344: serverCron (redis.c:1239)
       by 0x41D6CD: aeProcessEvents (ae.c:311)
       by 0x41D8EA: aeMain (ae.c:455)
       by 0x41A84B: main (redis.c:3832)
     Uninitialised value was created by a stack allocation
       at 0x457810: nodeUpdateAddressIfNeeded (cluster.c:1236)
    4a36350d
cluster.c 183.0 KB