redis 2.4.9和redis 2.4.10有个坑,被我撞上了

如果碰上这个bug,redis进程会挂掉。我下午已经在官网上提交bug,作者很有效率,说正在writing a fix.

经过我的测试,redis 2.4.6是正常的,redis 2.4.7及2.4.8未测试,

作者的解释:

Hey, this is what happens:

SORT lookup keys for the "GET" option using a stack allocated robj structure, however this object in the current 2.4.x implementation is no longer a "read only" object, to propagate the expire to the slave we use it to compose the protocol that we send to the slave. But this object can’t be shared, as will be destroyed after the function returns. Hence everything crashes apart ;)

Writing a fix. Thanks.

https://github.com/antirez/redis/issues/460#issuecomment-5171033