Edit report at https://bugs.php.net/bug.php?id=62824&edit=1
ID: 62824 Updated by: ras...@php.net Reported by: ras...@php.net Summary: Invalid read in strptime -Status: Open +Status: Not a bug Type: Bug Package: Date/time related Operating System: Linux PHP Version: 5.4Git-2012-08-15 (Git) Block user comment: N Private report: N New Comment: Looks like this was a false positive from an svn-version of Valgrind. Current Valgrind 3.8.0 doesn't see an invalid read here. Previous Comments: ------------------------------------------------------------------------ [2012-08-15 05:05:58] ras...@php.net Description: ------------ ==26201== Invalid read of size 8 ==26201== at 0x8355A84: __GI___strncasecmp_l (strcmp.S:1862) ==26201== by 0x8377F16: __strptime_internal (strptime_l.c:420) ==26201== by 0x6DA392: zif_strptime (datetime.c:101) ==26201== by 0x874BE8: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:642) ==26201== by 0x82F10E: execute (zend_vm_execute.h:410) ==26201== by 0x7D0376: zend_execute_scripts (zend.c:1286) ==26201== by 0x76FED2: php_execute_script (main.c:2473) ==26201== by 0x87724E: do_cli (php_cli.c:988) ==26201== by 0x439C6D: main (php_cli.c:1364) ==26201== Address 0xe750948 is 0 bytes after a block of size 8 alloc'd ==26201== at 0x4C2C56F: malloc (vg_replace_malloc.c:267) ==26201== by 0x7AA930: _estrndup (zend_alloc.c:2596) ==26201== by 0x7CDD2B: _zval_copy_ctor_func (zend_variables.c:121) ==26201== by 0x7FD79F: ZEND_SEND_VAL_SPEC_CONST_HANDLER (zend_variables.h:45) ==26201== by 0x82F10E: execute (zend_vm_execute.h:410) ==26201== by 0x7D0376: zend_execute_scripts (zend.c:1286) ==26201== by 0x76FED2: php_execute_script (main.c:2473) ==26201== by 0x87724E: do_cli (php_cli.c:988) ==26201== by 0x439C6D: main (php_cli.c:1364) ==26201== ==26201== Invalid read of size 8 ==26201== at 0x8353C5C: __GI___strncasecmp_l (strcmp.S:216) ==26201== by 0x8377FAC: __strptime_internal (strptime_l.c:431) ==26201== by 0x6DA392: zif_strptime (datetime.c:101) ==26201== by 0x874BE8: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:642) ==26201== by 0x82F10E: execute (zend_vm_execute.h:410) ==26201== by 0x7D0376: zend_execute_scripts (zend.c:1286) ==26201== by 0x76FED2: php_execute_script (main.c:2473) ==26201== by 0x87724E: do_cli (php_cli.c:988) ==26201== by 0x439C6D: main (php_cli.c:1364) ==26201== Address 0xe750948 is 0 bytes after a block of size 8 alloc'd ==26201== at 0x4C2C56F: malloc (vg_replace_malloc.c:267) ==26201== by 0x7AA930: _estrndup (zend_alloc.c:2596) ==26201== by 0x7CDD2B: _zval_copy_ctor_func (zend_variables.c:121) ==26201== by 0x7FD79F: ZEND_SEND_VAL_SPEC_CONST_HANDLER (zend_variables.h:45) ==26201== by 0x82F10E: execute (zend_vm_execute.h:410) ==26201== by 0x7D0376: zend_execute_scripts (zend.c:1286) ==26201== by 0x76FED2: php_execute_script (main.c:2473) ==26201== by 0x87724E: do_cli (php_cli.c:988) ==26201== by 0x439C6D: main (php_cli.c:1364) ==26201== ==26201== Invalid read of size 8 ==26201== at 0x8355A84: __GI___strncasecmp_l (strcmp.S:1862) ==26201== by 0x837802B: __strptime_internal (strptime_l.c:444) ==26201== by 0x6DA392: zif_strptime (datetime.c:101) ==26201== by 0x874BE8: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:642) ==26201== by 0x82F10E: execute (zend_vm_execute.h:410) ==26201== by 0x7D0376: zend_execute_scripts (zend.c:1286) ==26201== by 0x76FED2: php_execute_script (main.c:2473) ==26201== by 0x87724E: do_cli (php_cli.c:988) ==26201== by 0x439C6D: main (php_cli.c:1364) ==26201== Address 0xe750948 is 0 bytes after a block of size 8 alloc'd ==26201== at 0x4C2C56F: malloc (vg_replace_malloc.c:267) ==26201== by 0x7AA930: _estrndup (zend_alloc.c:2596) ==26201== by 0x7CDD2B: _zval_copy_ctor_func (zend_variables.c:121) ==26201== by 0x7FD79F: ZEND_SEND_VAL_SPEC_CONST_HANDLER (zend_variables.h:45) ==26201== by 0x82F10E: execute (zend_vm_execute.h:410) ==26201== by 0x7D0376: zend_execute_scripts (zend.c:1286) ==26201== by 0x76FED2: php_execute_script (main.c:2473) ==26201== by 0x87724E: do_cli (php_cli.c:988) ==26201== by 0x439C6D: main (php_cli.c:1364) ==26201== ==26201== Invalid read of size 8 ==26201== at 0x8353C5C: __GI___strncasecmp_l (strcmp.S:216) ==26201== by 0x8378520: __strptime_internal (strptime_l.c:446) ==26201== by 0x6DA392: zif_strptime (datetime.c:101) ==26201== by 0x874BE8: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:642) ==26201== by 0x82F10E: execute (zend_vm_execute.h:410) ==26201== by 0x7D0376: zend_execute_scripts (zend.c:1286) ==26201== by 0x76FED2: php_execute_script (main.c:2473) ==26201== by 0x87724E: do_cli (php_cli.c:988) ==26201== by 0x439C6D: main (php_cli.c:1364) ==26201== Address 0xe750948 is 0 bytes after a block of size 8 alloc'd ==26201== at 0x4C2C56F: malloc (vg_replace_malloc.c:267) ==26201== by 0x7AA930: _estrndup (zend_alloc.c:2596) ==26201== by 0x7CDD2B: _zval_copy_ctor_func (zend_variables.c:121) ==26201== by 0x7FD79F: ZEND_SEND_VAL_SPEC_CONST_HANDLER (zend_variables.h:45) ==26201== by 0x82F10E: execute (zend_vm_execute.h:410) ==26201== by 0x7D0376: zend_execute_scripts (zend.c:1286) ==26201== by 0x76FED2: php_execute_script (main.c:2473) ==26201== by 0x87724E: do_cli (php_cli.c:988) ==26201== by 0x439C6D: main (php_cli.c:1364) ==26201== ==26201== Invalid read of size 8 ==26201== at 0x8354804: __GI___strncasecmp_l (strcmp.S:862) ==26201== by 0x8377F16: __strptime_internal (strptime_l.c:420) ==26201== by 0x6DA392: zif_strptime (datetime.c:101) ==26201== by 0x874BE8: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:642) ==26201== by 0x82F10E: execute (zend_vm_execute.h:410) ==26201== by 0x7D0376: zend_execute_scripts (zend.c:1286) ==26201== by 0x76FED2: php_execute_script (main.c:2473) ==26201== by 0x87724E: do_cli (php_cli.c:988) ==26201== by 0x439C6D: main (php_cli.c:1364) ==26201== Address 0xe750948 is 0 bytes after a block of size 8 alloc'd ==26201== at 0x4C2C56F: malloc (vg_replace_malloc.c:267) ==26201== by 0x7AA930: _estrndup (zend_alloc.c:2596) ==26201== by 0x7CDD2B: _zval_copy_ctor_func (zend_variables.c:121) ==26201== by 0x7FD79F: ZEND_SEND_VAL_SPEC_CONST_HANDLER (zend_variables.h:45) ==26201== by 0x82F10E: execute (zend_vm_execute.h:410) ==26201== by 0x7D0376: zend_execute_scripts (zend.c:1286) ==26201== by 0x76FED2: php_execute_script (main.c:2473) ==26201== by 0x87724E: do_cli (php_cli.c:988) ==26201== by 0x439C6D: main (php_cli.c:1364) ==26201== ==26201== Invalid read of size 8 ==26201== at 0x8354804: __GI___strncasecmp_l (strcmp.S:862) ==26201== by 0x837802B: __strptime_internal (strptime_l.c:444) ==26201== by 0x6DA392: zif_strptime (datetime.c:101) ==26201== by 0x874BE8: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:642) ==26201== by 0x82F10E: execute (zend_vm_execute.h:410) ==26201== by 0x7D0376: zend_execute_scripts (zend.c:1286) ==26201== by 0x76FED2: php_execute_script (main.c:2473) ==26201== by 0x87724E: do_cli (php_cli.c:988) ==26201== by 0x439C6D: main (php_cli.c:1364) ==26201== Address 0xe750948 is 0 bytes after a block of size 8 alloc'd ==26201== at 0x4C2C56F: malloc (vg_replace_malloc.c:267) ==26201== by 0x7AA930: _estrndup (zend_alloc.c:2596) ==26201== by 0x7CDD2B: _zval_copy_ctor_func (zend_variables.c:121) ==26201== by 0x7FD79F: ZEND_SEND_VAL_SPEC_CONST_HANDLER (zend_variables.h:45) ==26201== by 0x82F10E: execute (zend_vm_execute.h:410) ==26201== by 0x7D0376: zend_execute_scripts (zend.c:1286) ==26201== by 0x76FED2: php_execute_script (main.c:2473) ==26201== by 0x87724E: do_cli (php_cli.c:988) ==26201== by 0x439C6D: main (php_cli.c:1364) ==26201== ==26201== Invalid read of size 8 ==26201== at 0x8353C5C: __GI___strncasecmp_l (strcmp.S:216) ==26201== by 0x8377F16: __strptime_internal (strptime_l.c:420) ==26201== by 0x6DA392: zif_strptime (datetime.c:101) ==26201== by 0x874BE8: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:642) ==26201== by 0x82F10E: execute (zend_vm_execute.h:410) ==26201== by 0x7D0376: zend_execute_scripts (zend.c:1286) ==26201== by 0x76FED2: php_execute_script (main.c:2473) ==26201== by 0x87724E: do_cli (php_cli.c:988) ==26201== by 0x439C6D: main (php_cli.c:1364) ==26201== Address 0xe750948 is 0 bytes after a block of size 8 alloc'd ==26201== at 0x4C2C56F: malloc (vg_replace_malloc.c:267) ==26201== by 0x7AA930: _estrndup (zend_alloc.c:2596) ==26201== by 0x7CDD2B: _zval_copy_ctor_func (zend_variables.c:121) ==26201== by 0x7FD79F: ZEND_SEND_VAL_SPEC_CONST_HANDLER (zend_variables.h:45) ==26201== by 0x82F10E: execute (zend_vm_execute.h:410) ==26201== by 0x7D0376: zend_execute_scripts (zend.c:1286) ==26201== by 0x76FED2: php_execute_script (main.c:2473) ==26201== by 0x87724E: do_cli (php_cli.c:988) ==26201== by 0x439C6D: main (php_cli.c:1364) ==26201== ==26201== Invalid read of size 8 ==26201== at 0x8353C5C: __GI___strncasecmp_l (strcmp.S:216) ==26201== by 0x837802B: __strptime_internal (strptime_l.c:444) ==26201== by 0x6DA392: zif_strptime (datetime.c:101) ==26201== by 0x874BE8: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:642) ==26201== by 0x82F10E: execute (zend_vm_execute.h:410) ==26201== by 0x7D0376: zend_execute_scripts (zend.c:1286) ==26201== by 0x76FED2: php_execute_script (main.c:2473) ==26201== by 0x87724E: do_cli (php_cli.c:988) ==26201== by 0x439C6D: main (php_cli.c:1364) ==26201== Address 0xe750948 is 0 bytes after a block of size 8 alloc'd ==26201== at 0x4C2C56F: malloc (vg_replace_malloc.c:267) ==26201== by 0x7AA930: _estrndup (zend_alloc.c:2596) ==26201== by 0x7CDD2B: _zval_copy_ctor_func (zend_variables.c:121) ==26201== by 0x7FD79F: ZEND_SEND_VAL_SPEC_CONST_HANDLER (zend_variables.h:45) ==26201== by 0x82F10E: execute (zend_vm_execute.h:410) ==26201== by 0x7D0376: zend_execute_scripts (zend.c:1286) ==26201== by 0x76FED2: php_execute_script (main.c:2473) ==26201== by 0x87724E: do_cli (php_cli.c:988) ==26201== by 0x439C6D: main (php_cli.c:1364) ==26201== ==26201== Invalid read of size 8 ==26201== at 0x83545B4: __GI___strncasecmp_l (strcmp.S:737) ==26201== by 0x8377F16: __strptime_internal (strptime_l.c:420) ==26201== by 0x6DA392: zif_strptime (datetime.c:101) ==26201== by 0x874BE8: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:642) ==26201== by 0x82F10E: execute (zend_vm_execute.h:410) ==26201== by 0x7D0376: zend_execute_scripts (zend.c:1286) ==26201== by 0x76FED2: php_execute_script (main.c:2473) ==26201== by 0x87724E: do_cli (php_cli.c:988) ==26201== by 0x439C6D: main (php_cli.c:1364) ==26201== Address 0xe750948 is 0 bytes after a block of size 8 alloc'd ==26201== at 0x4C2C56F: malloc (vg_replace_malloc.c:267) ==26201== by 0x7AA930: _estrndup (zend_alloc.c:2596) ==26201== by 0x7CDD2B: _zval_copy_ctor_func (zend_variables.c:121) ==26201== by 0x7FD79F: ZEND_SEND_VAL_SPEC_CONST_HANDLER (zend_variables.h:45) ==26201== by 0x82F10E: execute (zend_vm_execute.h:410) ==26201== by 0x7D0376: zend_execute_scripts (zend.c:1286) ==26201== by 0x76FED2: php_execute_script (main.c:2473) ==26201== by 0x87724E: do_cli (php_cli.c:988) ==26201== by 0x439C6D: main (php_cli.c:1364) ==26201== ==26201== Invalid read of size 8 ==26201== at 0x83545B4: __GI___strncasecmp_l (strcmp.S:737) ==26201== by 0x837802B: __strptime_internal (strptime_l.c:444) ==26201== by 0x6DA392: zif_strptime (datetime.c:101) ==26201== by 0x874BE8: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:642) ==26201== by 0x82F10E: execute (zend_vm_execute.h:410) ==26201== by 0x7D0376: zend_execute_scripts (zend.c:1286) ==26201== by 0x76FED2: php_execute_script (main.c:2473) ==26201== by 0x87724E: do_cli (php_cli.c:988) ==26201== by 0x439C6D: main (php_cli.c:1364) ==26201== Address 0xe750948 is 0 bytes after a block of size 8 alloc'd ==26201== at 0x4C2C56F: malloc (vg_replace_malloc.c:267) ==26201== by 0x7AA930: _estrndup (zend_alloc.c:2596) ==26201== by 0x7CDD2B: _zval_copy_ctor_func (zend_variables.c:121) ==26201== by 0x7FD79F: ZEND_SEND_VAL_SPEC_CONST_HANDLER (zend_variables.h:45) ==26201== by 0x82F10E: execute (zend_vm_execute.h:410) ==26201== by 0x7D0376: zend_execute_scripts (zend.c:1286) ==26201== by 0x76FED2: php_execute_script (main.c:2473) ==26201== by 0x87724E: do_cli (php_cli.c:988) ==26201== by 0x439C6D: main (php_cli.c:1364) Test script: --------------- $orig = setlocale(LC_ALL, 'C'); date_default_timezone_set("GMT"); $res = strptime("July 10", '%B %H'); var_dump($res["tm_year"]); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62824&edit=1