Bug #53196 [Opn->Bgs]: zend_API.h has an error in INIT_OVERLOADED_CLASS_ENTRY Macro
| From: | felipe@php.net | Date: | Thu, 28 Oct 2010 20:33:48 +0000 |
| Subject: | Bug #53196 [Opn->Bgs]: zend_API.h has an error in INIT_OVERLOADED_CLASS_ENTRY Macro | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-155607@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53196&edit=1
ID: 53196
Updated by: felipe@php.net
Reported by: sven dot assmann at lubico dot biz
Summary: zend_API.h has an error in
INIT_OVERLOADED_CLASS_ENTRY Macro
-Status: Open
+Status: Bogus
Type: Bug
Package: Unknown/Other Function
Operating System: Linux
PHP Version: 5.3.3
Block user comment: N
New Comment:
This is not a bug, the macro is intended to use sizeof.
You need to use the literal string in the macro, not a variable.
Previous Comments:
------------------------------------------------------------------------
[2010-10-28 21:43:37] sven dot assmann at lubico dot biz
Description:
------------
#define INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name,
functions,
handle_fcall, handle_propget, handle_propset) \
INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name,
sizeof(class_name)-1, functions, handle_fcall, handle_propget,
handle_propset,
NULL, NULL)
leads to a segfault..
change it like
#define INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name,
functions,
handle_fcall, handle_propget, handle_propset) \
INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name,
strlen(class_name)+1, functions, handle_fcall, handle_propget,
handle_propset,
NULL, NULL)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53196&edit=1