From:             [EMAIL PROTECTED]
Operating system: FreeBSD 4.7
PHP version:      4.3.0-pre2
PHP Bug Type:     Zend Engine 2 problem
Bug description:  zend_parse_parameters() problem

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.

-- 
Edit bug report at http://bugs.php.net/?id=20234&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20234&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20234&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20234&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20234&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20234&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20234&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20234&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20234&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20234&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20234&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20234&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20234&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20234&r=isapi

Reply via email to