Stut wrote: > Per Jessen wrote: >>> Segfaults are a fact of life >> >> Only if you are forced to accept poor programming. I can assure you >> that segfaults are not tolerated in a regular production environment. >> Segfaults happen in test and development. > > I agree with you for the most part, but there are several points that > need to be made. > > First of all you need to remember that you are talking about an open > source project. I know that's no excuse for "poor programming" as you > call it, but it's also unreasonable to expect perfect code. Perhaps, but people do so anyway. Users of e.g. apache, linux, gcc, mysql, <pick any filesystem>, iptables - they all expect near-perfect behaviour (in the stable versions). I think at the very least we should strive for near-perfect. > Secondly you need to clarify what you actually want. When PHP > segfaults I doubt it's actually PHP that's doing it, it's more likely > to be one of the extensions being used. This is what I meant when I > said segfaults are a fact of life. You're dealing with a system that > can be compiled with arbitrary code from any source. While it's not > out of the question I very much doubt there are any cases where an > extra double quote will cause a segfault in the engine itself. As it happens I managed to cut the example down to just an empty XSLT stylesheet. The PHP binary I'm using was built by openSUSE, I think it's pretty bog standard. > The code you sent in response to dev-at-lenss.nl doesn't really say > where the problem is, but it seems to be all about XSL which is not > handled by PHP, it's done by a PHP extension. If extensions are really to be seen as completely separate from PHP (even though they are shipped and included by default), PHP should protect itself much better from them. Not even extensions should be able to produce a segfault just like that. The example I sent doesn't DO anything. The stylesheet is empty, the included file is empty. In this particular case, the problem is not so much in the XSLT extension - it is in fact caused by the previous virtual(). So back to PHP. (and apache). > To return to the original point, in a commercial environment it is > perfectly reasonable to expect developers to spend time hunting down > the cause of a segfault (or other bug). It is not reasonable to expect > the same from a volunteer-driven development team. I do think it's reasonable. It's a matter of setting the bar a little higher - especially when people use your code in production, even in commercial environments. When I see segfaults being caused by minor typos, I know the bar has been set much too low. > One final note... if you've spent "professional life (sofar) doing > development in C and assembler" why aren't you digging into the source > code, fixing the problems and submitting patches rather than > complaining? That, after all, is what open source projects like PHP > are all about. I've got other priorities and not enough time. Do a code-search on google on my name and you'll see many other projects to which I have actively contributed. E.g. hercules, etherboot and clamav. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php