Skip to content

Unable to build if Valgrind is available #8453

Closed
@vobruba-martin

Description

@vobruba-martin

Description

This code doesn't seem right:

/* Even if we don't build with valgrind support, include the symbol so that valgrind available
 * only at runtime will not result in false positives. */
#ifndef HAVE_VALGRIND
# define I_REPLACE_SONAME_FNNAME_ZU(soname, fnname) _vgr00000ZU_ ## soname ## _ ## fnname
#endif

ZEND_API bool ZEND_FASTCALL I_REPLACE_SONAME_FNNAME_ZU(NONE,zend_string_equal_val)(zend_string *s1, zend_string *s2)
{
	return !memcmp(ZSTR_VAL(s1), ZSTR_VAL(s2), ZSTR_LEN(s1));
}

Build fails with this error:

Zend/zend_string.c:375:29: error: ‘I_REPLACE_SONAME_FNNAME_ZU’ declared as function returning a function
 ZEND_API bool ZEND_FASTCALL I_REPLACE_SONAME_FNNAME_ZU(NONE,zend_string_equal_val)(zend_string *s1, zend_string *s2)
                             ^

As a workaround I had to use --without-valgrind to make the build successful.

PHP Version

PHP 8.1.5

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions