Bug #61411 PDO Segfaults with PERSISTENT == TRUE && EMULATE_PREPARES == FALSE Wrong allocation, that doesn't follow the scheme of using stmt->persistent was the root cause of the problem and the crash at free.