Several memory sanitizer

Conflicts:
	lib/MySQL_Thread.cpp
	src/main.cpp
pull/827/head^2
René Cannaò 10 years ago
parent c65866c96f
commit af9cb53c5d

1
deps/Makefile vendored

@ -58,6 +58,7 @@ re2/re2/obj/libre2.a:
cd re2 && tar -zxf re2-20140304.tgz
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

@ -2499,8 +2499,10 @@ __run_skip_2:
}
} else {
//spin_wrlock(&GloMTH->rwlock_resumes);
VALGRIND_DISABLE_ERROR_REPORTING;
pthread_mutex_lock(&thr->myexchange.mutex_resumes);
if (shutdown==0 && thr->shudown==0 && thr->myexchange.resume_mysql_sessions->len) {
VALGRIND_ENABLE_ERROR_REPORTING;
if (shutdown==0 && thr->shutdown==0 && thr->myexchange.resume_mysql_sessions->len) {
//unsigned int w=rand()%(GloMTH->num_threads);
//w++;
unsigned char c=0;
@ -2511,7 +2513,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

@ -2409,7 +2409,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,9 +128,11 @@ using namespace std;
static volatile int load_;
//__thread l_sfp *__thr_sfp=NULL;
//const char *malloc_conf = "xmalloc:true,lg_tcache_max:16,purge:decay";
const char *malloc_conf = "xmalloc:true,lg_chunk:18,lg_tcache_max:12,purge:ratio";
//#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 */
//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