Free metadata before freeing the arena. I don't have a repro script,
but the added assertion fails for many existing tests prior to this
change.
. Fixed bug #77956 (When mysqli.allow_local_infile = Off, use a meaningful
error message). (Sjon Hortensius)
+- MySQLnd:
+ . Fixed bug #77955 (Random segmentation fault in mysqlnd from php-fpm).
+ (Nikita)
+
- Opcache:
. Fixed bug #78015 (Incorrect evaluation of expressions involving partials
arrays in SCCP). (Nikita)
arena->ptr = (char*)checkpoint;
}
+static zend_always_inline zend_bool zend_arena_contains(zend_arena *arena, void *ptr)
+{
+ while (arena) {
+ if ((char*)ptr > (char*)arena && (char*)ptr <= arena->ptr) {
+ return 1;
+ }
+ arena = arena->prev;
+ }
+ return 0;
+}
+
#endif /* _ZEND_ARENA_H_ */
/*
{
DBG_ENTER("mysqlnd_res::free_result_contents_internal");
- result->m.free_result_buffers(result);
-
if (result->meta) {
+ ZEND_ASSERT(zend_arena_contains(result->memory_pool->arena, result->meta));
result->meta->m->free_metadata(result->meta);
result->meta = NULL;
}
+ result->m.free_result_buffers(result);
+
DBG_VOID_RETURN;
}
/* }}} */