Skip to content

Redis Benchmark: Fix coredump because of double free#7204

Merged
antirez merged 1 commit intoredis:unstablefrom
ShooterIT:benchmark-fix
May 8, 2020
Merged

Redis Benchmark: Fix coredump because of double free#7204
antirez merged 1 commit intoredis:unstablefrom
ShooterIT:benchmark-fix

Conversation

@ShooterIT
Copy link
Member

I find redis-benchmark coredumps when I do some tests by changing parameters of client-output-buffer-limit. reply will be the last value if the second call 'redisGetReply' fails but the first succeeds, so we will free memory two times. https://github.com/antirez/redis/blob/unstable/src/redis-benchmark.c#L282

The backtrac is shown below.

./src/redis-benchmark -p 6381 -t get
ERROR: failed to fetch CONFIG from 127.0.0.1:6381
*** Error in `./src/redis-benchmark': double free or corruption (fasttop): 0x00000000015513d0 ***
======= Backtrace: =========
/usr/local/gcc-8.2/lib/libc.so.6(+0x73940)[0x7f4c4adfb940]
/usr/local/gcc-8.2/lib/libc.so.6(+0x78ed8)[0x7f4c4ae00ed8]
/usr/local/gcc-8.2/lib/libc.so.6(+0x79fd3)[0x7f4c4ae01fd3]
./src/redis-benchmark[0x4117a6]
./src/redis-benchmark(main+0x2bd)[0x40e16d]
/opt/compiler/gcc-8.2/lib/libc.so.6(__libc_start_main+0xee)[0x7f4c4ada9b8e]
./src/redis-benchmark(_start+0x29)[0x40f2f9]

@antirez antirez merged commit 5fa6f9e into redis:unstable May 8, 2020
@antirez
Copy link
Contributor

antirez commented May 8, 2020

Thanks @ShooterIT

JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request May 15, 2020
Redis Benchmark: Fix coredump because of double free
@ShooterIT ShooterIT deleted the benchmark-fix branch January 6, 2025 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants