Skip to content
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

Some tests reporting memory leaks with PHP 8.4 debug mode #65

Open
mlazdans opened this issue Mar 4, 2025 · 0 comments
Open

Some tests reporting memory leaks with PHP 8.4 debug mode #65

mlazdans opened this issue Mar 4, 2025 · 0 comments

Comments

@mlazdans
Copy link
Contributor

mlazdans commented Mar 4, 2025

Did not test on other PHP versions yet but on PHP 8.4 (Zend Extension Build => API420240924,NTS,debug) these tests fail with memory leaks or assersions:

  1. InterBase: connect, close and pconnect [tests/002.phpt]
ibase_query.c(1009) :  Freeing 0x00007fc77da030c0 (16 bytes), script=tests/002.php
ibase_query.c(967) :  Freeing 0x00007fc77da03180 (16 bytes), script=tests/002.php
ibase_query.c(955) :  Freeing 0x00007fc77da5a280 (102 bytes), script=tests/002.php
ibase_query.c(1111) :  Freeing 0x00007fc77da6c480 (344 bytes), script=tests/002.php
ibase_query.c(1102) :  Freeing 0x00007fc77da812a0 (192 bytes), script=tests/002.php
=== Total 12 memory leaks detected ===
  1. InterBase: misc sql types (may take a while) [tests/003.phpt]
ibase_query.c(1009) :  Freeing 0x00007fc977a030c0 (16 bytes), script=tests/003.php
ibase_query.c(967) :  Freeing 0x00007fc977a03180 (16 bytes), script=tests/003.php
ibase_query.c(979) :  Freeing 0x00007fc977a03420 (16 bytes), script=tests/003.php
ibase_query.c(976) :  Freeing 0x00007fc977a035d0 (16 bytes), script=tests/003.php
ibase_query.c(973) :  Freeing 0x00007fc977a036f0 (16 bytes), script=tests/003.php
ibase_query.c(970) :  Freeing 0x00007fc977a03750 (16 bytes), script=tests/003.php
ibase_query.c(964) :  Freeing 0x00007fc977a03810 (16 bytes), script=tests/003.php
ibase_query.c(952) :  Freeing 0x00007fc977a77f00 (1000 bytes), script=tests/003.php
ibase_query.c(1102) :  Freeing 0x00007fc977a81380 (192 bytes), script=tests/003.php
ibase_query.c(1111) :  Freeing 0x00007fc977a98a00 (2424 bytes), script=tests/003.php
=== Total 300 memory leaks detected ===
  1. InterBase: BLOB test [tests/004.phpt]
ibase_query.c(1009) :  Freeing 0x00007f2e654030c0 (16 bytes), script=tests/004.php
ibase_query.c(989) :  Freeing 0x00007f2e65403180 (16 bytes), script=tests/004.php
ibase_query.c(1102) :  Freeing 0x00007f2e65481380 (192 bytes), script=tests/004.php
ibase_query.c(1111) :  Freeing 0x00007f2e65481540 (184 bytes), script=tests/004.php
=== Total 16 memory leaks detected ===
  1. InterBase: binding (may take a while) [tests/006.phpt]
ibase_query.c(1009) :  Freeing 0x00007f7c9c8030c0 (16 bytes), script=tests/006.php
ibase_query.c(967) :  Freeing 0x00007f7c9c803180 (16 bytes), script=tests/006.php
ibase_query.c(979) :  Freeing 0x00007f7c9c8033c0 (16 bytes), script=tests/006.php
ibase_query.c(976) :  Freeing 0x00007f7c9c803480 (16 bytes), script=tests/006.php
ibase_query.c(973) :  Freeing 0x00007f7c9c8034e0 (16 bytes), script=tests/006.php
ibase_query.c(970) :  Freeing 0x00007f7c9c803540 (16 bytes), script=tests/006.php
ibase_query.c(964) :  Freeing 0x00007f7c9c803600 (16 bytes), script=tests/006.php
ibase_query.c(952) :  Freeing 0x00007f7c9c878400 (1000 bytes), script=tests/006.php
ibase_query.c(1102) :  Freeing 0x00007f7c9c8812a0 (192 bytes), script=tests/006.php
ibase_query.c(1111) :  Freeing 0x00007f7c9c8819a0 (184 bytes), script=tests/006.php
=== Total 271 memory leaks detected ===
  1. InterBase: array handling [tests/007.phpt]
php: /usr/src/php-8.4.4/Zend/zend_hash.c:2736: zend_hash_internal_pointer_reset_ex: Assertion `(&ht->nInternalPointer != pos || zend_gc_refcount(&(ht)->gc) == 1) || ((ht)->u.flags & (1<<6))' failed.
Aborted (core dumped)

Termsig=6

1-4 all are in _php_ibase_alloc_xsqlda() allocating var->sqldata. This leakage should not be hard to track down and fix (I haven't been able yet though 😅)

5 is rather interesting. Some kind of bug passing arrays to Firebird array fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant