Several memory sanitizer

pull/827/head
René Cannaò 10 years ago
parent d0d764533d
commit dbc74c0b53

1
deps/Makefile vendored

@ -71,6 +71,7 @@ re2/re2/obj/libre2.a:
cd re2 && tar -zxf re2.tar.gz
# cd re2/re2 && sed -i -e 's/-O3 -g /-O3 -fPIC /' Makefile
# cd re2 && patch re2/util/mutex.h < mutex.h.patch
cd re2/re2 && sed -i -e 's/-O3 /-O3 -DMEMORY_SANITIZER /' Makefile
cd re2/re2 && CC=${CC} CXX=${CXX} ${MAKE}
re2: re2/re2/obj/libre2.a

@ -2515,7 +2515,9 @@ __run_skip_2:
}
} else {
//spin_wrlock(&GloMTH->rwlock_resumes);
VALGRIND_DISABLE_ERROR_REPORTING;
pthread_mutex_lock(&thr->myexchange.mutex_resumes);
VALGRIND_ENABLE_ERROR_REPORTING;
if (shutdown==0 && thr->shutdown==0 && thr->myexchange.resume_mysql_sessions->len) {
//unsigned int w=rand()%(GloMTH->num_threads);
//w++;
@ -2527,7 +2529,9 @@ __run_skip_2:
}
}
//spin_wrunlock(&GloMTH->rwlock_resumes);
VALGRIND_DISABLE_ERROR_REPORTING;
pthread_mutex_unlock(&thr->myexchange.mutex_resumes);
VALGRIND_ENABLE_ERROR_REPORTING;
}
} else {
// iterate through all sessions and process the session logic

@ -2423,7 +2423,10 @@ __end_while_pool:
char *add=NULL; char *port=NULL;
close(fds[i].fd);
c_split_2(socket_names[i], ":" , &add, &port);
if (atoi(port)==0) { unlink(socket_names[i]); }
if (atoi(port)==0) {
if (socket_names[i])
unlink(socket_names[i]);
}
}
free(arg);
return NULL;

@ -128,11 +128,11 @@ using namespace std;
static volatile int load_;
//__thread l_sfp *__thr_sfp=NULL;
#ifdef DEBUG
const char *malloc_conf = "xmalloc:true,lg_tcache_max:16,purge:decay,junk:true,tcache:false";
#else
//#ifdef DEBUG
//const char *malloc_conf = "xmalloc:true,lg_tcache_max:16,purge:decay,junk:true,tcache:false";
//#else
const char *malloc_conf = "xmalloc:true,lg_tcache_max:16,purge:decay";
#endif /* DEBUG */
//#endif /* DEBUG */
//const char *malloc_conf = "prof_leak:true,lg_prof_sample:0,prof_final:true,xmalloc:true,lg_tcache_max:16";
int listen_fd;

Loading…
Cancel
Save