Some valgrind fixes
Former-commit-id: ba974c9810dc30b6b5bd21c4bcc6cc5b219f7ea4
This commit is contained in:
parent
f252cc9e41
commit
ad4d76422c
@ -408,7 +408,7 @@ noopt:
|
||||
$(MAKE) OPTIMIZATION="-O0"
|
||||
|
||||
valgrind:
|
||||
$(MAKE) OPTIMIZATION="-O0" MALLOC="libc" CFLAGS="-DSANITIZE" CXXFLAGS="-DSANITIZE"
|
||||
$(MAKE) OPTIMIZATION="-O0" USEASM="false" MALLOC="libc" CFLAGS="-DSANITIZE" CXXFLAGS="-DSANITIZE"
|
||||
|
||||
helgrind:
|
||||
$(MAKE) OPTIMIZATION="-O0" MALLOC="libc" CFLAGS="-D__ATOMIC_VAR_FORCE_SYNC_MACROS"
|
||||
|
@ -294,6 +294,7 @@ int aePostFunction(aeEventLoop *eventLoop, std::function<void()> fn, bool fSynch
|
||||
}
|
||||
|
||||
aeCommand cmd = {};
|
||||
memset(&cmd, 0, sizeof(aeCommand));
|
||||
cmd.op = AE_ASYNC_OP::PostCppFunction;
|
||||
cmd.pfn = new (MALLOC_LOCAL) std::function<void()>(fn);
|
||||
cmd.pctl = nullptr;
|
||||
|
@ -1173,6 +1173,7 @@ void moveCommand(client *c) {
|
||||
/* Return zero if the key already exists in the target DB */
|
||||
if (lookupKeyWrite(dst,c->argv[1]) != NULL) {
|
||||
addReply(c,shared.czero);
|
||||
decrRefCount(o);
|
||||
return;
|
||||
}
|
||||
dbAdd(dst,c->argv[1],o);
|
||||
|
@ -2561,7 +2561,7 @@ int slaveTryPartialResynchronization(redisMaster *mi, connection *conn, int read
|
||||
* establish a connection with the master. */
|
||||
void syncWithMaster(connection *conn) {
|
||||
serverAssert(GlobalLocksAcquired());
|
||||
char tmpfile[256], *err = NULL;
|
||||
char tmpfile[256] = {0}, *err = NULL;
|
||||
int dfd = -1, maxtries = 5;
|
||||
int psync_result;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user