From df39a06341623197b53b143fff83dd371b5c4e17 Mon Sep 17 00:00:00 2001 From: Justin Geibel Date: Fri, 20 Dec 2019 19:16:45 -0500 Subject: [PATCH 1/2] Add MALLOC_CONF to CI to match production --- .github/workflows/ci.yml | 1 + .travis.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9069dde357a..443a50856f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,6 +66,7 @@ jobs: TEST_DATABASE_URL: postgres://postgres:@localhost/cargo_registry_test CARGO_INCREMENTAL: 0 RUSTFLAGS: "-C debuginfo=0 -D warnings" + MALLOC_CONF: "background_thread:true,abort_conf:true" steps: - uses: actions/checkout@v2-beta diff --git a/.travis.yml b/.travis.yml index ea12b7cc85c..9b2c0d63e85 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,6 +28,7 @@ env: - PGPORT=5433 - PATH=$HOME/.cargo/bin:$PATH - RUSTFLAGS="-C debuginfo=0 -D warnings" + - MALLOC_CONF=background_thread:true,abort_conf:true install: - sudo cp /etc/postgresql/10/main/pg_hba.conf /etc/postgresql/11/main/pg_hba.conf From 8cd03c76fa3b681bee5179ba69846a5111fd2d3d Mon Sep 17 00:00:00 2001 From: Justin Geibel Date: Fri, 20 Dec 2019 19:19:08 -0500 Subject: [PATCH 2/2] Enable additional MALLOC_CONF options on CI On top of the production configuration, this commit adds two options: * `abort:true` - most jemalloc warnings become fatal ([opt.abort]) * `junk:true` - both allocated and deallocated memory will be initialized to 0xa5. ([opt.junk]) Combined with the existing `abort_conf:true`, this should be equivalent to enabling the `debug` feature of `jemallocator`. We cannot enable this feature in `Cargo.toml` because that would affect performance in production. [opt.abort]: http://jemalloc.net/jemalloc.3.html#opt.abort [opt.junk]: http://jemalloc.net/jemalloc.3.html#opt.junk --- .github/workflows/ci.yml | 2 +- .travis.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 443a50856f2..cc4e69450c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,7 @@ jobs: TEST_DATABASE_URL: postgres://postgres:@localhost/cargo_registry_test CARGO_INCREMENTAL: 0 RUSTFLAGS: "-C debuginfo=0 -D warnings" - MALLOC_CONF: "background_thread:true,abort_conf:true" + MALLOC_CONF: "background_thread:true,abort_conf:true,abort:true,junk:true" steps: - uses: actions/checkout@v2-beta diff --git a/.travis.yml b/.travis.yml index 9b2c0d63e85..e2653f1438a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ env: - PGPORT=5433 - PATH=$HOME/.cargo/bin:$PATH - RUSTFLAGS="-C debuginfo=0 -D warnings" - - MALLOC_CONF=background_thread:true,abort_conf:true + - MALLOC_CONF=background_thread:true,abort_conf:true,abort:true,junk:true install: - sudo cp /etc/postgresql/10/main/pg_hba.conf /etc/postgresql/11/main/pg_hba.conf