From 28b230823036b74872027545143db403f2456322 Mon Sep 17 00:00:00 2001 From: Marek Vavrusa Date: Sat, 14 May 2016 15:32:38 -0700 Subject: [PATCH] build: more checks for travis builds --- .travis.yml | 4 +++- contrib/ccan/asprintf/asprintf.c | 2 +- contrib/ccan/asprintf/asprintf.h | 2 +- daemon/worker.c | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4ddf4eb5e..cac31183c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,9 +24,11 @@ env: global: - PKG_CONFIG_PATH="${HOME}/.local/lib/pkgconfig" - PATH="${HOME}/.local/bin:/usr/local/bin:${PATH}" - - CFLAGS="-O0 -g -fno-omit-frame-pointer" + - CFLAGS="-O2 -g -fno-omit-frame-pointer -DMP_FREELIST_SIZE=0" - LD_LIBRARY_PATH="${HOME}/.local/lib" - DYLD_LIBRARY_PATH="${HOME}/.local/lib" + - MALLOC_CHECK_=3 + - MALLOC_PERTURB_=223 before_script: - ./scripts/bootstrap-depends.sh ${HOME}/.local script: diff --git a/contrib/ccan/asprintf/asprintf.c b/contrib/ccan/asprintf/asprintf.c index e9e02d7dd..9e66e1348 100644 --- a/contrib/ccan/asprintf/asprintf.c +++ b/contrib/ccan/asprintf/asprintf.c @@ -16,7 +16,7 @@ char *PRINTF_FMT(1, 2) afmt(const char *fmt, ...) return ptr; } -#if !HAVE_ASPRINTF +#if !HAVE_ASPRINTF && !defined(__USE_FORTIFY_LEVEL) #include #include diff --git a/contrib/ccan/asprintf/asprintf.h b/contrib/ccan/asprintf/asprintf.h index 958e244b5..37da83e98 100644 --- a/contrib/ccan/asprintf/asprintf.h +++ b/contrib/ccan/asprintf/asprintf.h @@ -12,7 +12,7 @@ */ char *PRINTF_FMT(1, 2) afmt(const char *fmt, ...); -#if HAVE_ASPRINTF +#if HAVE_ASPRINTF || defined(__USE_FORTIFY_LEVEL) #include #else #include diff --git a/daemon/worker.c b/daemon/worker.c index 1edf36f4e..1af988fe5 100644 --- a/daemon/worker.c +++ b/daemon/worker.c @@ -111,7 +111,7 @@ static uv_handle_t *ioreq_spawn(struct qr_task *task, int socktype) struct session *session = handle->data; session->outgoing = true; int ret = array_push(session->tasks, task); - if (ret != 0) { + if (ret < 0) { io_deinit(handle); req_release(task->worker, (struct req *)handle); return NULL; -- 2.47.2