#45734 [Fbk->Csd]: PHP segfaults in date_timezone_set for a timezone without ID
ID: 45734 User updated by: alex at kiesel dot name Reported By: alex at kiesel dot name -Status: Feedback +Status: Closed Bug Type: Date/time related Operating System: Linux PHP Version: 5.2.6 New Comment: Probably a duplicate of #45038. Previous Comments: [2008-08-06 14:54:02] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.3-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.3-win32-installer-latest.msi [2008-08-06 14:48:55] alex at kiesel dot name Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x2b9db3cf24f0 (LWP 16473)] 0x0048d5ba in timelib_tzinfo_clone () (gdb) bt #0 0x0048d5ba in timelib_tzinfo_clone () #1 0x004702bb in zif_date_timezone_set () #2 0x005f0747 in ?? () #3 0x005e05c3 in execute () #4 0x005c130d in zend_execute_scripts () #5 0x0057f8f8 in php_execute_script () #6 0x006443f5 in main () [2008-08-06 14:44:55] alex at kiesel dot name Description: PHP segfaults after issueing a WARNING. Reproduce code: --- Expected result: Warning: date_timezone_set(): Can only do this for zones with ID for now in /home/ak/timezone-segfault.php on line 4 Actual result: -- Warning: date_timezone_set(): Can only do this for zones with ID for now in /home/ak/timezone-segfault.php on line 4 Segmentation fault -- Edit this bug report at http://bugs.php.net/?id=45734&edit=1
#45734 [Com]: PHP segfaults in date_timezone_set for a timezone without ID
ID: 45734 Comment by: alex at kiesel dot name Reported By: alex at kiesel dot name Status: Open Bug Type: Date/time related Operating System: Linux PHP Version: 5.2.6 New Comment: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x2b9db3cf24f0 (LWP 16473)] 0x0048d5ba in timelib_tzinfo_clone () (gdb) bt #0 0x0048d5ba in timelib_tzinfo_clone () #1 0x004702bb in zif_date_timezone_set () #2 0x005f0747 in ?? () #3 0x005e05c3 in execute () #4 0x005c130d in zend_execute_scripts () #5 0x0057f8f8 in php_execute_script () #6 0x006443f5 in main () Previous Comments: [2008-08-06 14:44:55] alex at kiesel dot name Description: PHP segfaults after issueing a WARNING. Reproduce code: --- Expected result: Warning: date_timezone_set(): Can only do this for zones with ID for now in /home/ak/timezone-segfault.php on line 4 Actual result: -- Warning: date_timezone_set(): Can only do this for zones with ID for now in /home/ak/timezone-segfault.php on line 4 Segmentation fault -- Edit this bug report at http://bugs.php.net/?id=45734&edit=1
#45734 [NEW]: PHP segfaults in date_timezone_set for a timezone without ID
From: alex at kiesel dot name Operating system: Linux PHP version: 5.2.6 PHP Bug Type: Date/time related Bug description: PHP segfaults in date_timezone_set for a timezone without ID Description: PHP segfaults after issueing a WARNING. Reproduce code: --- Expected result: Warning: date_timezone_set(): Can only do this for zones with ID for now in /home/ak/timezone-segfault.php on line 4 Actual result: -- Warning: date_timezone_set(): Can only do this for zones with ID for now in /home/ak/timezone-segfault.php on line 4 Segmentation fault -- Edit bug report at http://bugs.php.net/?id=45734&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45734&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45734&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45734&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45734&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45734&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45734&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45734&r=needscript Try newer version:http://bugs.php.net/fix.php?id=45734&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45734&r=support Expected behavior:http://bugs.php.net/fix.php?id=45734&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45734&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45734&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45734&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45734&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45734&r=dst IIS Stability:http://bugs.php.net/fix.php?id=45734&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45734&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45734&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45734&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45734&r=mysqlcfg
#42910 [Com]: Constructing DateTime with TimeZone Indicator invalidates DateTimeZone
ID: 42910 Comment by: alex at kiesel dot name Reported By: php at michaelho dot com Status: Assigned Bug Type: Date/time related Operating System: Mac OS X 10.4.10 PHP Version: 5.2.4 Assigned To: derick New Comment: I also believe that there should be a possibility to distinguish between a timezone "constructed" by an GMT offset and one constructed by an timezone identifier. Here is a shorter reproducting script which shows the inconsistency: This prints: $ php date.php string(22) "+0200 Australia/Sydney" Previous Comments: [2007-10-09 23:42:18] [EMAIL PROTECTED] This is expected behavior, but I'll check your claim about getName(). [2007-10-09 23:35:16] php at michaelho dot com Typo... the first sentence in the third paragraph should read: "My guess is that **IF** a timezone indicator is passed into the __construct() method..." [2007-10-09 23:33:36] php at michaelho dot com Description: When creating a new DateTime with an timezone indicator (e.g. "-0800"), it seems to ignore any DateTimeZone rules as specified either by the default_timezone setting OR by an explicit DateTimeZone parameter. Notice that in the example below, the engine no longer applies DateTimeZone rules for $bar, even though the engine still lists "America/Los_Angeles" as $bar's DateTimeZone value. My guess is that a timezone indicator is passed into the __construct() method, it will be very difficult for the engine to deduce the correct DateTimeZone rules to use for that DateTime object, and thus, no rules should be applied after this point. If this is the case, then at the very least $bar->getTimezone()->getName() should return something like 'Undefined' or 'Custom/-0800' or something like that, to correctly indicate it is no longer using 'America/Los_Angeles' timezone rules. Reproduce code: --- date_default_timezone_set('America/Los_Angeles'); $foo = new DateTime('2007-03-11'); $bar = new DateTime('2007-03-11T00:00:00-0800'); print $foo->format(DateTime::ISO8601) . ' - ' . $foo->getTimezone()->getName() . ' - ' . $foo->format('U') . "\r\n"; print $bar->format(DateTime::ISO8601) . ' - ' . $foo->getTimezone()->getName() . ' - ' . $bar->format('U') . "\r\n"; $foo->setDate(2007, 03, 12); $bar->setDate(2007, 03, 12); print $foo->format(DateTime::ISO8601) . ' - ' . $foo->getTimezone()->getName() . ' - ' . $foo->format('U') . "\r\n"; print $bar->format(DateTime::ISO8601) . ' - ' . $foo->getTimezone()->getName() . ' - ' . $bar->format('U') . "\r\n"; Expected result: 2007-03-11T00:00:00-0800 - America/Los_Angeles - 117360 2007-03-11T00:00:00-0800 - America/Los_Angeles - 117360 2007-03-12T00:00:00-0700 - America/Los_Angeles - 1173682800 2007-03-12T00:00:00-0700 - America/Los_Angeles - 1173682800 Actual result: -- 2007-03-11T00:00:00-0800 - America/Los_Angeles - 117360 2007-03-11T00:00:00-0800 - America/Los_Angeles - 117360 2007-03-12T00:00:00-0700 - America/Los_Angeles - 1173682800 2007-03-12T00:00:00-0800 - America/Los_Angeles - 1173686400 -- Edit this bug report at http://bugs.php.net/?id=42910&edit=1
#40047 [Bgs->Opn]: stream_eof() return code ignored
ID: 40047 User updated by: alex at kiesel dot name Reported By: alex at kiesel dot name -Status: Bogus +Status: Open Bug Type: Streams related Operating System: Gentoo Linux PHP Version: 5.2.0 New Comment: Sorry, it really doesn't matter what stream_eof() returns; subsequent calls to stream_read() are being done regardless of its return value. Removing the function isn't possible as it is a required stream function. Due to performance reasons, one might want to save those calls to stream_eof() (or the last stream_read() call), though. Previous Comments: [2007-01-07 18:21:42] [EMAIL PROTECTED] The return value of the function is most definitely not ignored. The internal streams IO requires the additional read, hence the 2nd call. [2007-01-07 13:01:44] alex at kiesel dot name Description: When reading through a stream wrapper, the method stream_eof() is called, but it's result is discarded and ignored. This leads to an obsolete call to stream_read(). Reproduce code: --- http://kiesel.name/php/stream.phps Expected result: string(11) "stream_stat" string(43) "stream_read(8192) / 80 / returning 80 bytes" string(14) "stream_eof(): " bool(true) Actual result: -- string(11) "stream_stat" string(43) "stream_read(8192) / 80 / returning 80 bytes" string(14) "stream_eof(): " bool(true) string(42) "stream_read(8192) / 80 / returning 0 bytes" string(14) "stream_eof(): " bool(true) -- Edit this bug report at http://bugs.php.net/?id=40047&edit=1
#40047 [NEW]: stream_eof() return code ignored
From: alex at kiesel dot name Operating system: Gentoo Linux PHP version: 5.2.0 PHP Bug Type: Streams related Bug description: stream_eof() return code ignored Description: When reading through a stream wrapper, the method stream_eof() is called, but it's result is discarded and ignored. This leads to an obsolete call to stream_read(). Reproduce code: --- http://kiesel.name/php/stream.phps Expected result: string(11) "stream_stat" string(43) "stream_read(8192) / 80 / returning 80 bytes" string(14) "stream_eof(): " bool(true) Actual result: -- string(11) "stream_stat" string(43) "stream_read(8192) / 80 / returning 80 bytes" string(14) "stream_eof(): " bool(true) string(42) "stream_read(8192) / 80 / returning 0 bytes" string(14) "stream_eof(): " bool(true) -- Edit bug report at http://bugs.php.net/?id=40047&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40047&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40047&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40047&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40047&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40047&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40047&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40047&r=needscript Try newer version:http://bugs.php.net/fix.php?id=40047&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40047&r=support Expected behavior:http://bugs.php.net/fix.php?id=40047&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40047&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40047&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40047&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40047&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40047&r=dst IIS Stability:http://bugs.php.net/fix.php?id=40047&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40047&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40047&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40047&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40047&r=mysqlcfg
#38217 [NEW]: ReflectionClass::newInstanceArgs() tries to allocate too much memory
From: alex at kiesel dot name Operating system: FreeBSD 6.0 PHP version: 5CVS-2006-07-26 (CVS) PHP Bug Type: Reproducible crash Bug description: ReflectionClass::newInstanceArgs() tries to allocate too much memory Description: ReflectionClass::newInstanceArgs() tries to allocate huge pieces of memory, the engine dies because allowed memory size is exceeded. Omitting the empty constructor makes the problem go away, so it might be related to that. The error also occurs in PHP 5.1.4. Reproduce code: --- newInstanceArgs()); ?> Expected result: PHP Warning: ReflectionClass::newInstanceArgs() expects exactly 2 parameters, 1 given in /usr/home/alex/reflection_newinstance.php object(Object)#2 (0) { } Actual result: -- PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 550152752 bytes) in /usr/home/alex/reflection_newinstance.php on line 8 -- Edit bug report at http://bugs.php.net/?id=38217&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38217&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38217&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38217&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38217&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38217&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38217&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=38217&r=needscript Try newer version:http://bugs.php.net/fix.php?id=38217&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38217&r=support Expected behavior:http://bugs.php.net/fix.php?id=38217&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38217&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38217&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38217&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38217&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38217&r=dst IIS Stability:http://bugs.php.net/fix.php?id=38217&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38217&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38217&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38217&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=38217&r=mysqlcfg
#38194 [NEW]: ReflectionClass::isSubclassOf() returns TRUE for the class itself
From: alex at kiesel dot name Operating system: FreeBSD 6.0 PHP version: 5.1.4 PHP Bug Type: Scripting Engine problem Bug description: ReflectionClass::isSubclassOf() returns TRUE for the class itself Description: The ReflectionClass::isSubclassOf() returns TRUE when passing a ReflectionClass object of the same class as parameter. A class is not a subclass of itself, however. Reproduce code: --- isSubclassOf($objectClass)); ?> Expected result: bool(false) Actual result: -- bool(true) -- Edit bug report at http://bugs.php.net/?id=38194&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38194&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38194&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38194&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38194&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38194&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38194&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=38194&r=needscript Try newer version:http://bugs.php.net/fix.php?id=38194&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38194&r=support Expected behavior:http://bugs.php.net/fix.php?id=38194&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38194&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38194&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38194&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38194&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38194&r=dst IIS Stability:http://bugs.php.net/fix.php?id=38194&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38194&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38194&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38194&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=38194&r=mysqlcfg