• yoav-steinberg's avatar
    Support passing stack allocated module strings to moduleCreateArgvFromUserFormat (#7528) · e28aa99a
    yoav-steinberg authored
    Specifically, the key passed to the module aof_rewrite callback is a stack allocated robj. When passing it to RedisModule_EmitAOF (with appropriate "s" fmt string) redis used to panic when trying to inc the ref count of the stack allocated robj. Now support such robjs by coying them to a new heap robj. This doesn't affect performance because using the alternative "c" or "b" format strings also copies the input to a new heap robj.
    
    (cherry picked from commit d484b8a0)
    e28aa99a
module.c 311 KB