From c02aa79ebcfd27a6eccba1b6c36ca40dd667d225 Mon Sep 17 00:00:00 2001 From: Yuansheng Date: Tue, 18 Sep 2018 15:54:51 +0800 Subject: [PATCH] bugfix: nginx did not destroy the cycle memory pool before the nginx test configuration process exits. --- patches/nginx-1.13.6-test_config_destroy_pool.patch | 13 +++++++++++++ util/mirror-tarballs | 6 ++++++ 2 files changed, 19 insertions(+) create mode 100644 patches/nginx-1.13.6-test_config_destroy_pool.patch diff --git a/patches/nginx-1.13.6-test_config_destroy_pool.patch b/patches/nginx-1.13.6-test_config_destroy_pool.patch new file mode 100644 index 0000000..b1bc6ac --- /dev/null +++ b/patches/nginx-1.13.6-test_config_destroy_pool.patch @@ -0,0 +1,13 @@ +diff --git a/src/core/nginx.c b/src/core/nginx.c +index abaa50d6..6369264e 100644 +--- a/src/core/nginx.c ++++ b/src/core/nginx.c +@@ -314,6 +314,8 @@ main(int argc, char *const *argv) + } + } + ++ /* just to make it ASAN or Valgrind clean */ ++ ngx_destroy_pool(cycle->pool); + return 0; + } + diff --git a/util/mirror-tarballs b/util/mirror-tarballs index 3dc8d64..640241a 100755 --- a/util/mirror-tarballs +++ b/util/mirror-tarballs @@ -400,6 +400,12 @@ if [ "$main_ver" = "1.13.6" ]; then echo fi +if [ "$main_ver" = "1.13.6" ]; then + echo "$info_txt applying the test_config_destroy_pool patch for nginx" + patch -p1 < $root/patches/nginx-$main_ver-test_config_destroy_pool.patch || exit 1 + echo +fi + rm -f *.patch || exit 1 echo "$info_txt applying the always_enable_cc_feature_tests patch to nginx"