mirror of
https://github.com/redis/redis.git
synced 2026-06-05 06:39:39 -04:00
fix for unintended crash during panic response
If redis crashes early, before lua is set up (like, if File Descriptor 0 is closed before exec), it will crash again trying to print memory statistics.
This commit is contained in:
parent
c49fb47fbe
commit
071197fb64
1 changed files with 1 additions and 1 deletions
|
|
@ -4037,7 +4037,7 @@ sds genRedisInfoString(const char *section) {
|
|||
size_t zmalloc_used = zmalloc_used_memory();
|
||||
size_t total_system_mem = server.system_memory_size;
|
||||
const char *evict_policy = evictPolicyToString();
|
||||
long long memory_lua = (long long)lua_gc(server.lua,LUA_GCCOUNT,0)*1024;
|
||||
long long memory_lua = server.lua ? (long long)lua_gc(server.lua,LUA_GCCOUNT,0)*1024 : 0;
|
||||
struct redisMemOverhead *mh = getMemoryOverheadData();
|
||||
|
||||
/* Peak memory is updated from time to time by serverCron() so it
|
||||
|
|
|
|||
Loading…
Reference in a new issue