Bug #54366 mysqlnd crashes in case of OOM
Submitted: 9 Jun 2010 13:32 Modified: 9 Jun 2010 13:33
Reporter: Andrey Hristov Email Updates:
Status: Closed Impact on me:
None 
Category:Connectors: mysqlnd ( PHP ) Severity:S2 (Serious)
Version:5.3, trunk OS:Any
Assigned to: Andrey Hristov CPU Architecture:Any

[9 Jun 2010 13:32] Andrey Hristov
Description:
There are no reports, because this condition is rare. It needs to be simulated to be able to fix the crashes. mysqlnd wraps the two allocators used in PHP, so it can control the allocation itself. In the allocator there is a probe to return NULL on allocation after certain number of allocation. There are few parameters as there are a few allocating functions (emalloc, malloc, ecalloc, calloc,
realloc, erealloc).
There are many crashes

How to repeat:
Set them manually and then run the test suite under valgrind to find crashes or memory problems.
[9 Jun 2010 13:33] Andrey Hristov
The crashes have been already fixed, this bug was created post-factum to book the hours worked on it.
Fixes will appear in PHP 5.3.3