Hi!

> Oh? Did I understand you correctly? If you can code PHP that crashes 
> PHP, it's that codes fault not PHP's fault? I've always thought PHP
> to be high level programming language where PHP handles things for
> you and you can't code anything that crashes it like that with
> bus error?

There are a number of ways that you could lead to a crash in PHP. Say,
some infinite loops can end up in crashes. Calling some functions with
specific parameters on some systems could end up in crashes. Some
libraries in some versions can lead to crashes. Etc, etc. We live in
imperfect world, and that includes software which necessarily relies on
other software. Making it perfectly 100% crash proof would be impractical.
If you have any proposal on how to solve this particular problem, you
are welcome to propose a patch. Otherwise, much more practical solution
would be to fix that code.

> I think that it should at least gracefully exit, log error, what caused 
> what and where. Better option would be that it just works.

We can't really gracefully exit when OS produces bus error on missing
part of the file, because you changed it non-atomically. The only way to
avoid it would be to not use mmap, which would be a performance hit and
also not very helpful as you'd just get a mangled file instead.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to