@@ -182,6 +182,7 @@ ZEND_API void ZEND_FASTCALL _efree_huge(void *, size_t size);
182182ZEND_API ZEND_ATTRIBUTE_MALLOC void * __zend_malloc (size_t len ) ZEND_ATTRIBUTE_ALLOC_SIZE (1 );
183183ZEND_API ZEND_ATTRIBUTE_MALLOC void * __zend_calloc (size_t nmemb , size_t len ) ZEND_ATTRIBUTE_ALLOC_SIZE2 (1 ,2 );
184184ZEND_API void * __zend_realloc (void * p , size_t len ) ZEND_ATTRIBUTE_ALLOC_SIZE (2 );
185+ ZEND_API ZEND_ATTRIBUTE_MALLOC char * __zend_strdup (const char * s );
185186
186187/* Selective persistent/non persistent allocation macros */
187188#define pemalloc (size , persistent ) ((persistent)?__zend_malloc(size):emalloc(size))
@@ -201,7 +202,7 @@ ZEND_API void * __zend_realloc(void *p, size_t len) ZEND_ATTRIBUTE_ALLOC_SIZE(2)
201202#define safe_perealloc (ptr , nmemb , size , offset , persistent ) ((persistent)?_safe_realloc((ptr), (nmemb), (size), (offset)):safe_erealloc((ptr), (nmemb), (size), (offset)))
202203#define perealloc_recoverable (ptr , size , persistent ) ((persistent)?realloc((ptr), (size)):erealloc_recoverable((ptr), (size)))
203204#define perealloc2_recoverable (ptr , size , persistent ) ((persistent)?realloc((ptr), (size)):erealloc2_recoverable((ptr), (size), (copy_size)))
204- #define pestrdup (s , persistent ) ((persistent)?strdup (s):estrdup(s))
205+ #define pestrdup (s , persistent ) ((persistent)?__zend_strdup (s):estrdup(s))
205206#define pestrndup (s , length , persistent ) ((persistent)?zend_strndup((s),(length)):estrndup((s),(length)))
206207
207208#define pemalloc_rel (size , persistent ) ((persistent)?__zend_malloc(size):emalloc_rel(size))
0 commit comments