|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-11-03 21:34 UTC] nicos@php.net
[2002-11-04 05:40 UTC] wez@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 07:00:01 2025 UTC |
After making some extensions, I found at the doc that zend_get_parameters_ex() was supposed to be depreciated. As the doc is saying, I passed my script to zend_parse_parameters(). It works fine with zval*, long, double etc... But It looks it segfaults with a zval**. ZEND_FUNCTION(calculhmac) { zval **clent, **data; char *result; char *iclent, *idata; if (zend_parse_parameters(2, "zz", &clent, &data) == FAILURE) { WRONG_PARAM_COUNT; } convert_to_string_ex(clent); convert_to_string_ex(data); iclent = Z_STRVAL_PP(clent); idata = Z_STRVAL_PP(data); result = sp_CalculHmac(iclent, idata); RETURN_STRING(result, 1); } Note that it works fine with get and that parse is supposed to replace get... Here is the gdb report: Program received signal SIGSEGV, Segmentation fault. 0x4011baeb in strlen (str=0x0) at ../sysdeps/i386/strlen.c:28 28 ../sysdeps/i386/strlen.c: No such file or directory. in ../sysdeps/i386/strlen.c Thanks to verify that before closing.