Commit b5ff2708 authored by antirez's avatar antirez
Browse files

backtrace support removed: unreliable stack trace :(

parent 7f957c92
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# This file is released under the BSD license, see the COPYING file # This file is released under the BSD license, see the COPYING file
DEBUG?= -g DEBUG?= -g
CFLAGS?= -std=c99 -pedantic -O -Wall -W -DSDS_ABORT_ON_OOM CFLAGS?= -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM
CCOPT= $(CFLAGS) CCOPT= $(CFLAGS)
OBJ = adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o OBJ = adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o
......
...@@ -315,7 +315,6 @@ static time_t getExpire(redisDb *db, robj *key); ...@@ -315,7 +315,6 @@ static time_t getExpire(redisDb *db, robj *key);
static int setExpire(redisDb *db, robj *key, time_t when); static int setExpire(redisDb *db, robj *key, time_t when);
static void updateSalvesWaitingBgsave(int bgsaveerr); static void updateSalvesWaitingBgsave(int bgsaveerr);
static void freeMemoryIfNeeded(void); static void freeMemoryIfNeeded(void);
static void onSigsegv(int sig);
static void authCommand(redisClient *c); static void authCommand(redisClient *c);
static void pingCommand(redisClient *c); static void pingCommand(redisClient *c);
...@@ -894,8 +893,6 @@ static void initServer() { ...@@ -894,8 +893,6 @@ static void initServer() {
signal(SIGHUP, SIG_IGN); signal(SIGHUP, SIG_IGN);
signal(SIGPIPE, SIG_IGN); signal(SIGPIPE, SIG_IGN);
signal(SIGSEGV, onSigsegv);
signal(SIGBUS, onSigsegv);
server.clients = listCreate(); server.clients = listCreate();
server.slaves = listCreate(); server.slaves = listCreate();
...@@ -4064,18 +4061,6 @@ static void debugCommand(redisClient *c) { ...@@ -4064,18 +4061,6 @@ static void debugCommand(redisClient *c) {
} }
} }
static void onSigsegv(int sig) {
void *trace[25];
int n = backtrace(trace, 25);
char **symbols = backtrace_symbols(trace, n);
redisLog(REDIS_WARNING,"Got %s!!! Redis crashed, backtrace:",
sig == SIGSEGV ? "SIGSEGV" : "SIGBUS");
for (int i = 0; i < n; i++)
redisLog(REDIS_WARNING,symbols[i]);
exit(1);
}
/* =================================== Main! ================================ */ /* =================================== Main! ================================ */
#ifdef __linux__ #ifdef __linux__
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment