|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-01-04 03:02 UTC] laruence@php.net
[2013-01-04 03:02 UTC] laruence@php.net
-Status: Open
+Status: Closed
[2013-01-04 03:03 UTC] laruence@php.net
-Assigned To:
+Assigned To: laruence
[2013-01-04 03:03 UTC] laruence@php.net
[2013-01-04 03:05 UTC] laruence@php.net
[2013-01-04 03:06 UTC] laruence@php.net
[2013-01-04 03:06 UTC] laruence@php.net
[2013-01-12 16:39 UTC] derick@php.net
[2013-03-01 18:32 UTC] stas@php.net
[2014-10-07 23:20 UTC] stas@php.net
[2014-10-07 23:31 UTC] stas@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 09:00:01 2025 UTC |
Description: ------------ Address sanitizer detected a use after scope error in zend_compile.c - in the current GIT repository this problem starts at line 5044. if (CG(current_namespace)) { /* Prefix class name with name of current namespace */ znode tmp; tmp.u.constant = *CG(current_namespace); zval_copy_ctor(&tmp.u.constant); zend_do_build_namespace_name(&tmp, &tmp, class_name TSRMLS_CC); class_name = &tmp; efree(lcname); lcname = zend_str_tolower_dup(Z_STRVAL(class_name->u.constant), Z_STRLEN(class_name->u.constant)); } if (error) { char *tmp = zend_str_tolower_dup(Z_STRVAL_PP(ns_name), Z_STRLEN_PP(ns_name)); if (Z_STRLEN_PP(ns_name) != Z_STRLEN(class_name->u.constant) || memcmp(tmp, lcname, Z_STRLEN(class_name->u.constant))) { zend_error(E_COMPILE_ERROR, "Cannot declare class %s because the name is already in use", Z_STRVAL(class_name->u.constant)); } efree(tmp); } There is a scoped variable "znode tmp" on line 5046. It's address is assigned to the pointer class_name on line 5051 (class_name = &tmp). class_name is then used on line 5059 after the value it points to (tmp) has gone out of scope when the block finished on line 5054.