Mercurial > hg > nginx
view auto/lib/pcre/makefile.owc @ 4895:508e61393b6c
Event pipe: fixed handling of buf_to_file data.
Input filter might free a buffer if there is no data in it, and in case
of first buffer (used for cache header and request header, aka p->buf_to_file)
this resulted in cache corruption. Buffer memory was reused to read upstream
response before headers were written to disk.
Fix is to avoid moving pointers in ngx_event_pipe_add_free_buf() to a buffer
start if we were asked to free a buffer used by p->buf_to_file.
This fixes occasional cache file corruption, usually resulted
in "cache file ... has md5 collision" alerts.
Reported by Anatoli Marinov.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 30 Oct 2012 11:14:24 +0000 |
parents | d620f497c50f |
children | bd828a14e017 |
line wrap: on
line source
# Copyright (C) Igor Sysoev # Copyright (C) Nginx, Inc. CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s -bm $(CPU_OPT) PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10 pcre.lib: cd $(PCRE) wcl386 $(CFLAGS) -i=. $(PCREFLAGS) pcre_*.c dir /b *.obj > pcre.lst wlib -n pcre.lib @pcre.lst pcre.h: cd $(PCRE) copy /y pcre.h.generic pcre.h copy /y config.h.generic config.h copy /y pcre_chartables.c.dist pcre_chartables.c