Re: Considering segfaults: how to protect other requests?

From: Date: Sat, 21 Jan 2012 21:25:49 +0000
Subject: Re: Considering segfaults: how to protect other requests?
References: 1 2 3 4 5  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-9061@lists.php.net to get a copy of this message
On 01/21/2012 01:23 PM, Ferenc Kovacs wrote: > > Does just running Apache with prefork MPM warrants that each > request for > a functionality of the same PHP extension will be isolated from all > other requests? > > Note however that a segfault is the result of a programming error, > such as trying > to write to a random pointer. A segfault is nice, as it clearly > shows a failure, but > the same pointer error could potentially overwrite something that is > kept through > several requests, and corrupt something on a subsequent request (check > |MaxRequestsPerChild > > <http://httpd.apache.org/docs/__2.0/es/mod/mpm_common.html#__maxrequestsperchild > > <http://httpd.apache.org/docs/2.0/es/mod/mpm_common.html#maxrequestsperchild>>| > directive), or maybe show no failure at all (despite of the bug). > > > how? > the segfault would terminate the worker, and even overwriting stuff > would overwrite it for that worker, you can't directly overwrite the > apache control process. > am I missing something? He meant that you can have memory corruption without a segfault. So that one process can survive in a corrupted state and affect the next request to that process. Which is quite true, of course, but the scope of the original question was whether such memory corruption could jump from one process to another, and that is of course not possible. -Rasmus

« previous php.pecl.dev (#9061) next »