Skip to content

Commit a4bbd68

Browse files
committed
Disable leak detection for internal runtime cache for NTS
The internal runtime cache is never freed for NTS builds; as a *stop*- *gap* measure we disable the leak detection.
1 parent f108c16 commit a4bbd68

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Zend/zend_extensions.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,13 @@ ZEND_API void zend_init_internal_run_time_cache(void) {
332332
} ZEND_HASH_FOREACH_END();
333333

334334
size_t alloc_size = functions * rt_size;
335+
#ifndef ZTS
336+
ZEND_IGNORE_LEAKS_BEGIN();
337+
#endif
335338
char *ptr = pemalloc(alloc_size, 1);
339+
#ifndef ZTS
340+
ZEND_IGNORE_LEAKS_END();
341+
#endif
336342

337343
CG(internal_run_time_cache) = ptr;
338344
CG(internal_run_time_cache_size) = alloc_size;

0 commit comments

Comments
 (0)