Skip to content

Pdo\Firebird - persistent connection - setAttribute(Pdo\Firebird::ATTR_DATE_FORMAT, ..) results in "zend_mm_heap corrupted" #18276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
iratonert opened this issue Apr 8, 2025 · 3 comments

Comments

@iratonert
Copy link

Description

The following code:

$dbh = new PDO('firebird:dbname='.$database, $user, $password, array(PDO::ATTR_PERSISTENT => true));
$dbh->setAttribute(Pdo\Firebird::ATTR_DATE_FORMAT, '%m-%d-%Y');

Resulted in this output:
zend_mm_heap corrupted

I don't actually expect any output. The message "zend_mm_heap corrupted" seems to indicate that something went wrong.

If I don't establish a persistent connection, I don't get the "zend_mm_heap corrupted" message.

If I omit setting the Pdo\Firebird::ATTR_DATE_FORMAT attribute, I don't get the "zend_mm_heap corrupted" message.

It doesn't matter which of the Pdo\Firebird::ATTR_DATE_FORMAT, Pdo\Firebird::ATTR_TIME_FORMAT, or Pdo\Firebird::ATTR_TIMESTAMP_FORMAT attributes I set, or whether I set one of them, all three, or two of them. As soon as I use a persistent connection and set one of these attributes, I get the "zend_mm_heap corrupted" message at the end of the script.

PHP Version

PHP 8.4.1 (cli) (built: Nov 20 2024 11:13:22) (NTS Visual C++ 2022 x64)
Copyright (c) The PHP Group
Zend Engine v4.4.1, Copyright (c) Zend Technologies
with Xdebug v3.4.0, Copyright (c) 2002-2024, by Derick Rethans

Operating System

Windows 11

@iratonert
Copy link
Author

The same with this PHP Version

PHP 8.4.5 (cli) (built: Mar 12 2025 12:17:53) (NTS Visual C++ 2022 x64)
Copyright (c) The PHP Group
Zend Engine v4.4.5, Copyright (c) Zend Technologies
with Xdebug v3.4.0, Copyright (c) 2002-2024, by Derick Rethans

@iluuu1994
Copy link
Member

Maybe @SakiTakamachi can have a look?

@SakiTakamachi
Copy link
Member

I found the cause and will fix it :)

SakiTakamachi added a commit that referenced this issue Apr 15, 2025
* PHP-8.3:
  Fixed GH-18276 - persistent connection - "zend_mm_heap corrupted" with setAttribute() (#18280) Closes #18280 Fixes #18276
SakiTakamachi added a commit that referenced this issue Apr 15, 2025
* PHP-8.4:
  Fixed GH-18276 - persistent connection - "zend_mm_heap corrupted" with setAttribute() (#18280) Closes #18280 Fixes #18276
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants