ID:               48752
 Updated by:       paj...@php.net
 Reported By:      theta...@php.net
-Status:           Assigned
+Status:           Closed
 Bug Type:         Date/time related
 Operating System: * (ZTS build only!)
 PHP Version:      5.*, 6
-Assigned To:      derick
+Assigned To:      pajoye
 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2009-10-27 10:44:12] s...@php.net

Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=289982
Log: - #48752

------------------------------------------------------------------------

[2009-10-27 10:41:45] s...@php.net

Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=289981
Log: - #48752, crash during date parsing with invalid date

------------------------------------------------------------------------

[2009-10-24 23:36:59] paj...@php.net

here is a patch: http://pastie.org/668460

It makes the last_errors request specific as well as it should be.

However the problem is not completely solved as we need a lock before
the 1st operation on last_errors until we are done. It is not sufficent
to lock it before calling a function or setting it a value. Other
threads may affect it during two calls.

I consider this last_errors as a design mistake, but if you like to
keep it this way then we will need this global lock.

------------------------------------------------------------------------

[2009-10-24 22:52:41] paj...@php.net

Simply script:
$datetime_object = date_create("d");

with the timezone set in php.ini.

The crashes occur only with an invalid date. For some reason the global
last_errors is not NULL anymore (but it is set to NULL during MINIT) but
freed somewhere.

By the way, I do not understand the need to store the warning in a
GLOBALS (for all applications running on the same server) when we work
with object. That's a design flaw as other applications using the same
API at the same time may generate warnings, defeating the whole point of
the warnings (if they did not crash php before). That could affect NTS
server as well.





------------------------------------------------------------------------

[2009-10-24 20:34:36] theta...@php.net

Apache2 Windows builds are multithreaded (php5__ts__.dll) and therefore
have the same problems.

The problem: Multithread bugs do not have enough priority in PHP as
most people use apache on unix in prefork moder or use FastCGI :(

I would look after this, but I have no deep knowledge of the extension.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/48752

-- 
Edit this bug report at http://bugs.php.net/?id=48752&edit=1

Reply via email to