Travis: Unbreak the builds.

In the hopes of future-proofing as much as possible, jump to the latest
distribution Travis supports.
This commit is contained in:
David Goldblatt 2021-06-21 14:07:10 -07:00 committed by David Goldblatt
parent 4fb93a18ee
commit 0689448b1e
8 changed files with 87 additions and 151 deletions

View File

@ -1,5 +1,5 @@
language: generic language: generic
dist: precise dist: focal
matrix: matrix:
include: include:
@ -8,23 +8,20 @@ matrix:
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: osx - os: osx
arch: amd64 arch: amd64
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes -Wno-deprecated-declarations"
- os: linux - os: linux
arch: ppc64le arch: ppc64le
addons: &gcc_ppc env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
apt:
packages:
- g++-8
env: CC=gcc-8 CXX=g++-8 COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux - os: linux
arch: amd64 arch: amd64
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes"
- os: linux - os: linux
arch: amd64 arch: amd64
addons: &gcc_multilib addons: &gcc_multilib
apt: apt:
packages: packages:
- gcc-multilib - gcc-multilib
- g++-multilib
env: CC=gcc CXX=g++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=gcc CXX=g++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux - os: linux
arch: amd64 arch: amd64
@ -58,132 +55,92 @@ matrix:
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: osx - os: osx
arch: amd64 arch: amd64
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes -Wno-deprecated-declarations"
- os: osx - os: osx
arch: amd64 arch: amd64
env: CC=gcc CXX=g++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=gcc CXX=g++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes -Wno-deprecated-declarations"
- os: osx - os: osx
arch: amd64 arch: amd64
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes -Wno-deprecated-declarations"
- os: osx
arch: amd64
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes -Wno-deprecated-declarations"
- os: osx
arch: amd64
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-libdl" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes -Wno-deprecated-declarations"
- os: osx
arch: amd64
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-opt-safety-checks" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes -Wno-deprecated-declarations"
- os: osx
arch: amd64
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-lg-page=16" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes -Wno-deprecated-declarations"
- os: osx
arch: amd64
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes -Wno-deprecated-declarations"
- os: linux
arch: ppc64le
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: osx - os: linux
arch: amd64 arch: ppc64le
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux
arch: ppc64le
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: osx - os: linux
arch: amd64 arch: ppc64le
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-libdl" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-libdl" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: osx - os: linux
arch: amd64 arch: ppc64le
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-opt-safety-checks" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-opt-safety-checks" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: osx - os: linux
arch: amd64 arch: ppc64le
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-lg-page=16" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-lg-page=16" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: osx - os: linux
arch: amd64 arch: ppc64le
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux - os: linux
arch: ppc64le arch: ppc64le
addons: &gcc_ppc env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
apt:
packages:
- g++-8
env: CC=gcc-8 CXX=g++-8 COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux - os: linux
arch: ppc64le arch: ppc64le
addons: &gcc_ppc env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
apt:
packages:
- g++-8
env: CC=gcc-8 CXX=g++-8 COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux - os: linux
arch: ppc64le arch: ppc64le
addons: &gcc_ppc env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
apt:
packages:
- g++-8
env: CC=gcc-8 CXX=g++-8 COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux
arch: ppc64le
addons: &gcc_ppc
apt:
packages:
- g++-8
env: CC=gcc-8 CXX=g++-8 COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-libdl" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux
arch: ppc64le
addons: &gcc_ppc
apt:
packages:
- g++-8
env: CC=gcc-8 CXX=g++-8 COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-opt-safety-checks" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux
arch: ppc64le
addons: &gcc_ppc
apt:
packages:
- g++-8
env: CC=gcc-8 CXX=g++-8 COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-lg-page=16" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux
arch: ppc64le
addons: &gcc_ppc
apt:
packages:
- g++-8
env: CC=gcc-8 CXX=g++-8 COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux
arch: ppc64le
addons: &gcc_ppc
apt:
packages:
- g++-8
env: CC=gcc-8 CXX=g++-8 COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux
arch: ppc64le
addons: &gcc_ppc
apt:
packages:
- g++-8
env: CC=gcc-8 CXX=g++-8 COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux
arch: ppc64le
addons: &gcc_ppc
apt:
packages:
- g++-8
env: CC=gcc-8 CXX=g++-8 COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux - os: linux
arch: amd64 arch: amd64
addons: *gcc_multilib addons: *gcc_multilib
env: CC=clang CXX=clang++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=clang CXX=clang++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes"
- os: linux - os: linux
arch: amd64 arch: amd64
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes"
- os: linux - os: linux
arch: amd64 arch: amd64
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes"
- os: linux - os: linux
arch: amd64 arch: amd64
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes"
- os: linux - os: linux
arch: amd64 arch: amd64
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-libdl" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-libdl" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes"
- os: linux - os: linux
arch: amd64 arch: amd64
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-opt-safety-checks" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-opt-safety-checks" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes"
- os: linux - os: linux
arch: amd64 arch: amd64
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-lg-page=16" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-lg-page=16" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes"
- os: linux - os: linux
arch: amd64 arch: amd64
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes"
- os: linux - os: linux
arch: amd64 arch: amd64
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes"
- os: linux - os: linux
arch: amd64 arch: amd64
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes"
- os: linux - os: linux
arch: amd64 arch: amd64
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes"
- os: linux - os: linux
arch: amd64 arch: amd64
addons: *gcc_multilib addons: *gcc_multilib
@ -366,14 +323,6 @@ matrix:
- os: linux - os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --enable-experimental-smallocx --enable-stats --enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --enable-experimental-smallocx --enable-stats --enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
# Valgrind
- os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds" JEMALLOC_TEST_PREFIX="valgrind"
addons:
apt:
packages:
- valgrind
before_script: before_script:
- autoconf - autoconf

View File

@ -258,6 +258,7 @@ if test "x$GCC" = "xyes" ; then
JE_CFLAGS_ADD([-Wno-missing-braces]) JE_CFLAGS_ADD([-Wno-missing-braces])
dnl This one too. dnl This one too.
JE_CFLAGS_ADD([-Wno-missing-field-initializers]) JE_CFLAGS_ADD([-Wno-missing-field-initializers])
JE_CFLAGS_ADD([-Wno-missing-attributes])
JE_CFLAGS_ADD([-pipe]) JE_CFLAGS_ADD([-pipe])
JE_CFLAGS_ADD([-g3]) JE_CFLAGS_ADD([-g3])
elif test "x$je_cv_msvc" = "xyes" ; then elif test "x$je_cv_msvc" = "xyes" ; then

View File

@ -1,10 +1,10 @@
#!/usr/bin/env python #!/usr/bin/env python3
from itertools import combinations from itertools import combinations
travis_template = """\ travis_template = """\
language: generic language: generic
dist: precise dist: focal
matrix: matrix:
include: include:
@ -30,7 +30,6 @@ script:
# travis though, we don't test all 2**7 = 128 possible combinations of these; # travis though, we don't test all 2**7 = 128 possible combinations of these;
# instead, we only test combinations of up to 2 'unusual' settings, under the # instead, we only test combinations of up to 2 'unusual' settings, under the
# hope that bugs involving interactions of such settings are rare. # hope that bugs involving interactions of such settings are rare.
# Things at once, for C(7, 0) + C(7, 1) + C(7, 2) = 29
MAX_UNUSUAL_OPTIONS = 2 MAX_UNUSUAL_OPTIONS = 2
os_default = 'linux' os_default = 'linux'
@ -41,7 +40,6 @@ arch_unusual = 'ppc64le'
compilers_default = 'CC=gcc CXX=g++' compilers_default = 'CC=gcc CXX=g++'
compilers_unusual = 'CC=clang CXX=clang++' compilers_unusual = 'CC=clang CXX=clang++'
compilers_ppc_default = 'CC=gcc-8 CXX=g++-8'
compiler_flag_unusuals = ['-m32'] compiler_flag_unusuals = ['-m32']
@ -67,7 +65,7 @@ all_unusuals = (
) )
unusual_combinations_to_test = [] unusual_combinations_to_test = []
for i in xrange(MAX_UNUSUAL_OPTIONS + 1): for i in range(MAX_UNUSUAL_OPTIONS + 1):
unusual_combinations_to_test += combinations(all_unusuals, i) unusual_combinations_to_test += combinations(all_unusuals, i)
gcc_multilib_set = False gcc_multilib_set = False
@ -117,24 +115,24 @@ def format_job(combination):
job += ' apt:\n' job += ' apt:\n'
job += ' packages:\n' job += ' packages:\n'
job += ' - gcc-multilib\n' job += ' - gcc-multilib\n'
job += ' - g++-multilib\n'
gcc_multilib_set = True gcc_multilib_set = True
if arch == 'ppc64le':
job += ' addons:'
if gcc_ppc_set:
job += ' *gcc_ppc\n'
else:
job += ' &gcc_ppc\n'
job += ' apt:\n'
job += ' packages:\n'
job += ' - g++-8\n'
# Compilers overwritten for PPC64LE to gcc-8
compilers = compilers_ppc_default
# We get some spurious errors when -Warray-bounds is enabled. # We get some spurious errors when -Warray-bounds is enabled.
extra_cflags = ['-Werror', '-Wno-array-bounds']
if 'clang' in compilers or os == 'osx':
extra_cflags += [
'-Wno-unknown-warning-option',
'-Wno-ignored-attributes'
]
if os == 'osx':
extra_cflags += [
'-Wno-deprecated-declarations',
]
env_string = ('{} COMPILER_FLAGS="{}" CONFIGURE_FLAGS="{}" ' env_string = ('{} COMPILER_FLAGS="{}" CONFIGURE_FLAGS="{}" '
'EXTRA_CFLAGS="-Werror -Wno-array-bounds"').format( 'EXTRA_CFLAGS="{}"'.format(
compilers, " ".join(compiler_flags), " ".join(configure_flags)) compilers, ' '.join(compiler_flags), ' '.join(configure_flags),
' '.join(extra_cflags)))
job += ' env: %s\n' % env_string job += ' env: %s\n' % env_string
return job return job
@ -157,16 +155,19 @@ include_rows += '''\
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --enable-experimental-smallocx --enable-stats --enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --enable-experimental-smallocx --enable-stats --enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
''' '''
# Does not seem to be working on newer travis machines. Valgrind has long been a
# pain point; abandon it for now.
# Valgrind build bots # Valgrind build bots
include_rows += ''' #include_rows += '''
# Valgrind # # Valgrind
- os: linux # - os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds" JEMALLOC_TEST_PREFIX="valgrind" # arch: amd64
addons: # env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds" JEMALLOC_TEST_PREFIX="valgrind"
apt: # addons:
packages: # apt:
- valgrind # packages:
''' # - valgrind
#'''
# To enable valgrind on macosx add: # To enable valgrind on macosx add:
# #
@ -176,4 +177,4 @@ include_rows += '''
# #
# It currently fails due to: https://github.com/jemalloc/jemalloc/issues/1274 # It currently fails due to: https://github.com/jemalloc/jemalloc/issues/1274
print travis_template % include_rows print(travis_template % include_rows)

View File

@ -947,7 +947,7 @@ stats_arena_hpa_shard_print(emitter_t *emitter, unsigned i, uint64_t uptime) {
emitter_table_row(emitter, &header_row); emitter_table_row(emitter, &header_row);
emitter_json_array_kv_begin(emitter, "nonfull_slabs"); emitter_json_array_kv_begin(emitter, "nonfull_slabs");
bool in_gap = false; bool in_gap = false;
for (pszind_t j = 0; j < PSSET_NPSIZES; j++) { for (pszind_t j = 0; j < PSSET_NPSIZES && j < SC_NPSIZES; j++) {
stats_arenas_mib[5] = j; stats_arenas_mib[5] = j;
CTL_LEAF(stats_arenas_mib, 6, "npageslabs_huge", CTL_LEAF(stats_arenas_mib, 6, "npageslabs_huge",

View File

@ -581,5 +581,3 @@ test_status_t p_test_no_malloc_init(test_t *t, ...);
void p_test_init(const char *name); void p_test_init(const char *name);
void p_test_fini(void); void p_test_fini(void);
void p_test_fail(const char *prefix, const char *message); void p_test_fail(const char *prefix, const char *message);
void strncpy_cond(void *dst, const char *src, bool cond);

View File

@ -232,16 +232,3 @@ p_test_fail(const char *prefix, const char *message) {
malloc_cprintf(NULL, NULL, "%s%s\n", prefix, message); malloc_cprintf(NULL, NULL, "%s%s\n", prefix, message);
test_status = test_status_fail; test_status = test_status_fail;
} }
void
strncpy_cond(void *dst, const char *src, bool cond) {
if (cond) {
/*
* Avoid strcpy and explicitly set length to 0 because the
* `stringop-overflow` check may warn even if the specific test
* is unreachable.
*/
size_t n = cond ? strlen(src) + 1 : 0;
strncpy(dst, src, n);
}
}

View File

@ -473,8 +473,8 @@ static void
expect_iter_results_at(fb_group_t *fb, size_t nbits, size_t pos, expect_iter_results_at(fb_group_t *fb, size_t nbits, size_t pos,
bool val, bool forward) { bool val, bool forward) {
bool iter_res; bool iter_res;
size_t iter_begin; size_t iter_begin JEMALLOC_CC_SILENCE_INIT(0);
size_t iter_len; size_t iter_len JEMALLOC_CC_SILENCE_INIT(0);
if (val) { if (val) {
if (forward) { if (forward) {
iter_res = fb_srange_iter(fb, nbits, pos, iter_res = fb_srange_iter(fb, nbits, pos,

View File

@ -4,7 +4,7 @@
static void static void
update_log_var_names(const char *names) { update_log_var_names(const char *names) {
strncpy_cond(log_var_names, names, config_log); strncpy(log_var_names, names, sizeof(log_var_names));
} }
static void static void