[bug] possible bug in the range filter

Igor Sysoev is at rambler-co.ru
Wed Dec 12 17:18:11 MSK 2007


On Wed, Dec 12, 2007 at 03:12:29PM +0100, Manlio Perillo wrote:

> Igor Sysoev ha scritto:
> >On Wed, Dec 12, 2007 at 02:22:50PM +0100, Manlio Perillo wrote:
> >
> >>Manlio Perillo ha scritto:
> >>>Maxim Dounin ha scritto:
> >>>>Hello!
> >>>>
> >>>>On Tue, 11 Dec 2007, Manlio Perillo wrote:
> >>>>
> >>>>>I'm trying to add support for the nginx range filter in mod_wsgi but 
> >>>>>I have found some problems.
> >>>>>
> >>>[...]
> >>>Now I have to found the problem in mod_wsgi...
> >>>
> >>Ok, problem solved: I didn't set buf->start in a memory buffer...
> >>
> >>Strange that on Linux I get a 14: Bad address instead of a segmentation 
> >>fault.
> >
> >Segmentation fault of kernel ? :)
> 
> No, a SIGSEG signal!
> 
> >It seems that your module and nginx did not touch this memory, so the value
> >was passed to kernel and it saw its invalidity.
> >
> 
> Right, but why returning EFAULT instead of raising a SIGSEG?
> 
> Moreover:
> http://www.gnu.org/software/libc/manual/html_node/Error-Codes.html
> 
> Macro: int EFAULT
> 
>     Bad address; an invalid pointer was detected. In the GNU system, 
> this error never happens; you get a signal instead.
> 
> 
> But certainly I'm missing something ;-).

I never saw SIGSEG in this case on FreeBSD.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list