Hello,
I reply to Nuno because i think its post is the more objective i have seen.
The stack grows up/down is easy to know as Nuno said.
What more ? 5 functions, 3 global vars, some checks into recursive function
that all... Nothing impressive and it's a pruposing. It's sure that i need
more time & a cvs account to find all user-function that would to use
recursivity.
It's just a base.
And as Nuno said we can't keep allowing PHP to segfault because of stack
issues. And as i said in threaded environnement the problem is more serious.
-michael
----- Original Message -----
From: "Nuno Lopes" <[EMAIL PROTECTED]>
To: "Stefan Esser" <[EMAIL PROTECTED]>; "Michael Vergoz"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; "'Wez Furlong'" <[EMAIL PROTECTED]>;
"'Ilia Alshanetsky'" <[EMAIL PROTECTED]>; "'PHPdev'"
<internals@lists.php.net>
Sent: Saturday, February 25, 2006 5:53 PM
Subject: Re: [PHP-DEV] Vote for Zend Deep Stack Prevention (ZDSP)
Basicly your patch does just try to automatically detect the maximum
execution depth limit, that can be manually set with xdebug or
hardened-php patch for quite a while now...
which is not bad for the average user. I personally like the patch
(although it needs some tweaking), but the idea is there.
This kind of protection was rejected before to get into core and most
probably will be rejected again...
OK, but we can't keep allowing PHP to segfault because of stack issues..
If you don't want this patch, please considere the others you mention
(Xdebug or Hardened-PHP) to go into the core.
and that your code will fail on systems where the stack is growing into
the opposite direction.
thats not a real problem.. a simple configure program can detect such
things, like:
int main(int argc, char **argv) {
if ((void*)&argc > (void*)&argv) return 0; /* stack grows up */
if ((void*)&argc < (void*)&argv) return 1; /* stack grows down */
return 3;
}
Nuno
P.S.: I already have a solution for the PCRE stack-related segfaults..
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php