- 使用
redis-6.2.5
,make -j8 MALLOC=libc
编译一个redis-server
作为debug-info
- 制作热补丁,upatch-build、upatch-diff、compiler-hijacker、as-hijacker在同一目录
sudo ./release/upatch-build
-s ${redis根目录}
-i ${debug-info路径}
-b "make -j8 MALLOC=libc"
-e ./src/redis-server
./test/redis/0001-Prevent-unauthenticated-client-from-easily-consuming.patch
- 启动redis-server
redis-server ./test/redis/resis.config
- 测试
telnet 127.0.0.1 6380
*100
- 使用upatch-manage打热补丁
upatch-manage patch -p ${运行的pid} -u ${热补丁} -b ${运行的redis-server二进制文件}
- 测试
telnet 127.0.0.1 6380
*100