changeset 490:e66f886a8305 NGINX_0_7_57

nginx 0.7.57 *) Bugfix: a segmentation fault occurred in worker process, if the ngx_http_image_filter_module errors were redirected to named location; the bug had appeared in 0.7.56.
author Igor Sysoev <http://sysoev.ru>
date Tue, 12 May 2009 00:00:00 +0400
parents c91fb8e75a55
children bb2281a3edb6
files CHANGES CHANGES.ru auto/lib/md5/make auto/lib/openssl/make auto/lib/pcre/make auto/lib/pcre/makefile.bcc auto/lib/pcre/makefile.msvc auto/lib/sha1/make auto/lib/zlib/make auto/make src/core/nginx.h src/http/modules/ngx_http_image_filter_module.c src/http/modules/perl/nginx.pm
diffstat 13 files changed, 34 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES	Mon May 11 00:00:00 2009 +0400
+++ b/CHANGES	Tue May 12 00:00:00 2009 +0400
@@ -1,4 +1,11 @@
 
+Changes with nginx 0.7.57                                        12 May 2009
+
+    *) Bugfix: a segmentation fault occurred in worker process, if the 
+       ngx_http_image_filter_module errors were redirected to named 
+       location; the bug had appeared in 0.7.56.
+
+
 Changes with nginx 0.7.56                                        11 May 2009
 
     *) Feature: nginx/Windows supports IPv6 in a "listen" directive of the 
--- a/CHANGES.ru	Mon May 11 00:00:00 2009 +0400
+++ b/CHANGES.ru	Tue May 12 00:00:00 2009 +0400
@@ -1,4 +1,11 @@
 
+Изменения в nginx 0.7.57                                          12.05.2009
+
+    *) Исправление: при перенаправлении ошибок модуля 
+       ngx_http_image_filter_module в именованный location в рабочем 
+       процессе происходил floating-point fault; ошибка появилась в 0.7.56.
+
+
 Изменения в nginx 0.7.56                                          11.05.2009
 
     *) Добавление: nginx/Windows поддерживает IPv6 в директиве listen 
--- a/auto/lib/md5/make	Mon May 11 00:00:00 2009 +0400
+++ b/auto/lib/md5/make	Tue May 12 00:00:00 2009 +0400
@@ -35,7 +35,7 @@
 `echo "$MD5/md5.lib:	$NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"`
 	cd `echo $MD5 | sed -e "s/\//$ngx_regex_dirsep/g"`
 	\$(MAKE) -f $ngx_makefile $ngx_opt
-	cd ..\\..\\..
+	cd \$(CURDIR)
 
 END
 
--- a/auto/lib/openssl/make	Mon May 11 00:00:00 2009 +0400
+++ b/auto/lib/openssl/make	Tue May 12 00:00:00 2009 +0400
@@ -22,7 +22,7 @@
 	perl Configure VC-WIN32 no-shared
 	ms\\do_ms
 	\$(MAKE) -f ms\\nt.mak
-	cd ..\\..\\..
+	cd \$(CURDIR)
 
 END
 
@@ -39,7 +39,7 @@
 	perl Configure BC-32 no-shared
 	ms\\do_nasm
 	\$(MAKE) -f ms\\bcb.mak
-	cd ..\\..\\..
+	cd \$(CURDIR)
 
 END
 
--- a/auto/lib/pcre/make	Mon May 11 00:00:00 2009 +0400
+++ b/auto/lib/pcre/make	Tue May 12 00:00:00 2009 +0400
@@ -38,13 +38,12 @@
 `echo "$PCRE/pcre.h:	$NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"`
 	cd $ngx_pcre
 	\$(MAKE) -f $ngx_makefile pcre.h
-	cd ..\\..\\..
-
+	cd \$(CURDIR)
 
 `echo "$PCRE/pcre.lib:	$PCRE/pcre.h" | sed -e "s/\//$ngx_regex_dirsep/g"`
 	cd $ngx_pcre
 	\$(MAKE) -f $ngx_makefile $ngx_opt
-	cd ..\\..\\..
+	cd \$(CURDIR)
 
 END
 
--- a/auto/lib/pcre/makefile.bcc	Mon May 11 00:00:00 2009 +0400
+++ b/auto/lib/pcre/makefile.bcc	Tue May 12 00:00:00 2009 +0400
@@ -18,4 +18,4 @@
 pcre.h:
 	patch -o pcre.h pcre.in patch.pcre.in
 	patch -o config.h config.in patch.config.in
-	patch -o pcre.c pcre.c patch.pcre.c
+	patch < patch.pcre.c
--- a/auto/lib/pcre/makefile.msvc	Mon May 11 00:00:00 2009 +0400
+++ b/auto/lib/pcre/makefile.msvc	Tue May 12 00:00:00 2009 +0400
@@ -20,4 +20,4 @@
 pcre.h:
 	patch -o pcre.h pcre.in patch.pcre.in
 	patch -o config.h config.in patch.config.in
-	patch -o pcre.c pcre.c patch.pcre.c
+	patch < patch.pcre.c
--- a/auto/lib/sha1/make	Mon May 11 00:00:00 2009 +0400
+++ b/auto/lib/sha1/make	Tue May 12 00:00:00 2009 +0400
@@ -35,7 +35,7 @@
 `echo "$SHA1/sha1.lib:	$NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"`
 	cd `echo $SHA1 | sed -e "s/\//$ngx_regex_dirsep/g"`
 	\$(MAKE) -f $ngx_makefile $ngx_opt
-	cd ..\\..\\..
+	cd \$(CURDIR)
 
 END
 
--- a/auto/lib/zlib/make	Mon May 11 00:00:00 2009 +0400
+++ b/auto/lib/zlib/make	Tue May 12 00:00:00 2009 +0400
@@ -36,7 +36,7 @@
 `echo "$ZLIB/zlib.lib:	$NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"`
 	cd `echo $ZLIB | sed -e "s/\//$ngx_regex_dirsep/g"`
 	\$(MAKE) -f $ngx_makefile $ngx_opt
-	cd ..\\..\\..
+	cd \$(CURDIR)
 
 END
 
--- a/auto/make	Mon May 11 00:00:00 2009 +0400
+++ b/auto/make	Tue May 12 00:00:00 2009 +0400
@@ -22,6 +22,7 @@
 CFLAGS = $CFLAGS
 CPP =	$CPP
 LINK =	$LINK
+CURDIR = `pwd`
 
 END
 
--- a/src/core/nginx.h	Mon May 11 00:00:00 2009 +0400
+++ b/src/core/nginx.h	Tue May 12 00:00:00 2009 +0400
@@ -8,8 +8,8 @@
 #define _NGINX_H_INCLUDED_
 
 
-#define nginx_version         7056
-#define NGINX_VERSION      "0.7.56"
+#define nginx_version         7057
+#define NGINX_VERSION      "0.7.57"
 #define NGINX_VER          "nginx/" NGINX_VERSION
 
 #define NGINX_VAR          "NGINX"
--- a/src/http/modules/ngx_http_image_filter_module.c	Mon May 11 00:00:00 2009 +0400
+++ b/src/http/modules/ngx_http_image_filter_module.c	Tue May 12 00:00:00 2009 +0400
@@ -162,6 +162,13 @@
         return ngx_http_next_header_filter(r);
     }
 
+    ctx = ngx_http_get_module_ctx(r, ngx_http_image_filter_module);
+
+    if (ctx) {
+        ngx_http_set_ctx(r, NULL, ngx_http_image_filter_module);
+        return ngx_http_next_header_filter(r);
+    }
+
     conf = ngx_http_get_module_loc_conf(r, ngx_http_image_filter_module);
 
     if (conf->filter == NGX_HTTP_IMAGE_OFF) {
@@ -181,13 +188,6 @@
         return NGX_ERROR;
     }
 
-    ctx = ngx_http_get_module_ctx(r, ngx_http_image_filter_module);
-
-    if (ctx) {
-        ngx_http_set_ctx(r, NULL, ngx_http_image_filter_module);
-        return ngx_http_next_header_filter(r);
-    }
-
     ctx = ngx_pcalloc(r->pool, sizeof(ngx_http_image_filter_ctx_t));
     if (ctx == NULL) {
         return NGX_ERROR;
--- a/src/http/modules/perl/nginx.pm	Mon May 11 00:00:00 2009 +0400
+++ b/src/http/modules/perl/nginx.pm	Tue May 12 00:00:00 2009 +0400
@@ -47,7 +47,7 @@
     HTTP_INSUFFICIENT_STORAGE
 );
 
-our $VERSION = '0.7.56';
+our $VERSION = '0.7.57';
 
 require XSLoader;
 XSLoader::load('nginx', $VERSION);