We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

PHP 5.5.4 invalid pointer

Hi, I use php 5.5.4 and when I execute php -v or when I exit of the CLI, I have the following error in my shell

 [email protected]:~$ php -a
 Interactive shell

 php > exit
 *** Error in `php': free(): invalid pointer: 0x00007f44473ad480 ***
 ======= Backtrace: =========
 /lib/x86_64-linux-gnu/libc.so.6(+0x80a46)[0x7f444a2d9a46]
 /usr/local/lib/php6/lib/php/extensions/debug-zts-20121212/phalcon.so(+0x28bcb5)[0x7f44482f3cb5] 
 php(ts_free_id+0x183)[0xbed37a]
 php[0xd1be92]
 php[0xd2a0a8]
 php(zend_hash_graceful_reverse_destroy+0x69)[0xd2a363]
 php(zend_destroy_modules+0x43)[0xd18b93]
 php[0xd0913e]
 php(php_module_shutdown+0x91)[0xbfc5c8]
 php[0xe38658]
 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7f444a27aea5]
 php[0x438d45]
 ======= Memory map: ========
 00400000-01383000 r-xp 00000000 08:01 21366876                           /usr/local/bin/php
 01583000-01635000 r-xp 00f83000 08:01 21366876                           /usr/local/bin/php
 01635000-01748000 rwxp 01035000 08:01 21366876                           /usr/local/bin/php
 01748000-01901000 rwxp 00000000 00:00 0 
 7f4446e1d000-7f4446e4b000 rwxp 00000000 00:00 0 
 7f4446e4b000-7f4446e52000 r-xs 00000000 08:01 21367372                   /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache
 7f4446e52000-7f4447495000 rwxp 00000000 00:00 0 
 7f4447495000-7f44474a1000 r-xp 00000000 08:01 28574128                   /lib/x86_64-linux-gnu/libnss_files-2.17.so
 7f44474a1000-7f44476a0000 ---p 0000c000 08:01 28574128                   /lib/x86_64-linux-gnu/libnss_files-2.17.so
 7f44476a0000-7f44476a1000 r-xp 0000b000 08:01 28574128                   /lib/x86_64-linux-gnu/libnss_files-2.17.so
 7f44476a1000-7f44476a2000 rwxp 0000c000 08:01 28574128                   /lib/x86_64-linux-gnu/libnss_files-2.17.so
 7f44476a2000-7f44476ca000 rwxp 00000000 00:00 0 
 7f44476ca000-7f44476cb000 ---p 00000000 00:00 0 
 7f44476cb000-7f4448068000 rwxp 00000000 00:00 0 
 7f4448068000-7f4448330000 r-xp 00000000 08:01 23206963                   /usr/local/lib/php6/lib/php/extensions/debug-z  ts-20121212/phalcon.so
 7f4448330000-7f444852f000 ---p 002c8000 08:01 23206963                   /usr/local/lib/php6/lib/php/extensions/debug-zts-20121212 /phalcon.so
 7f444852f000-7f4448569000 r-xp 002c7000 08:01 23206963                   /usr/local/lib/php6/lib/php/extensions/debug-zts-20121212/phalcon.so
 7f4448569000-7f444856e000 rwxp 00301000 08:01 23206963                   /usr/local/lib/php6/lib/php/extensions/debug-zts-20121212/phalcon.so
 7f444856e000-7f4448577000 rwxp 00000000 00:00 0 
 7f4448577000-7f4448842000 r-xp 00000000 08:01 20973192                   /usr/lib/locale/locale-archive
 7f4448842000-7f44499b1000 r-xp 00000000 08:01 20971567                   /usr/lib/x86_64-linux-gnu/libicudata.so.48.1.1
 7f44499b1000-7f4449bb0000 ---p 0116f000 08:01 20971567                   /usr/lib/x86_64-linux-gnu/libicudata.so.48.1.1
 7f4449bb0000-7f4449bb1000 r-xp 0116e000 08:01 20971567                   /usr/lib/x86_64-linux-gnu/libicudata.so.48.1.1
 7f4449bb1000-7f4449bb2000 rwxp 0116f000 08:01 20971567                   /usr/lib/x86_64-linux-gnu/libicudata.so.48.1.1
 7f4449bb2000-7f4449c05000 r-xp 00000000 08:01 28573752                   /lib/x86_64-linux-gnu/libssl.so.1.0.0
 7f4449c05000-7f4449e05000 ---p 00053000 08:01 28573752                   /lib/x86_64-linux-gnu/libssl.so.1.0.0
 7f4449e05000-7f4449e08000 r-xp 00053000 08:01 28573752                   /lib/x86_64-linux-gnu/libssl.so.1.0.0
 7f4449e08000-7f4449e0e000 rwxp 00056000 08:01 28573752                   /lib/x86_64-linux-gnu/libssl.so.1.0.0
 7f4449e0e000-7f4449e0f000 rwxp 00000000 00:00 0 
 7f4449e0f000-7f4449e30000 r-xp 00000000 08:01 28574226                   /lib/x86_64-linux-gnu/liblzma.so.5.0.0
 7f4449e30000-7f444a02f000 ---p 00021000 08:01 28574226                   /lib/x86_64-linux-gnu/liblzma.so.5.0.0
 7f444a02f000-7f444a030000 r-xp 00020000 08:01 28574226                   /lib/x86_64-linux-gnu/liblzma.so.5.0.0
 7f444a030000-7f444a031000 rwxp 00021000 08:01 28574226                   /lib/x86_64-linux-gnu/liblzma.so.5.0.0
 7f444a031000-7f444a055000 r-xp 00000000 08:01 28574162                   /lib/x86_64-linux-gnu/libtinfo.so.5.9
 7f444a055000-7f444a254000 ---p 00024000 08:01 28574162                   /lib/x86_64-linux-gnu/libtinfo.so.5.9
 7f444a254000-7f444a258000 r-xp 00023000 08:01 28574162                   /lib/x86_64-linux-gnu/libtinfo.so.5.9
 7f444a258000-7f444a259000 rwxp 00027000 08:01 28574162                   /lib/x86_64-linux-gnu/libtinfo.so.5.9
 7f444a259000-7f444a417000 r-xp 00000000 08:01 28574105                   /lib/x86_64-linux-gnu/libc-2.17.so
 7f444a417000-7f444a616000 ---p 001be000 08:01 28574105                   /lib/x86_64-linux-gnu/libc-2.17.so
 7f444a616000-7f444a61a000 r-xp 001bd000 08:01 28574105                   /lib/x86_64-linux-gnu/libc-2.17.so
 7f444a61a000-7f444a61c000 rwxp 001c1000 08:01 28574105                   /lib/x86_64-linux-gnu/libc-2.17.so
 7f444a61c000-7f444a621000 rwxp 00000000 00:00 0 
 7f444a621000-7f444a639000 r-xp 00000000 08:01 28574115                   /lib/x86_64-linux-gnu/libpthread-2.17.so
 7f444a639000-7f444a838000 ---p 00018000 08:01 28574115                   /lib/x86_64-linux-gnu/libpthread-2.17.so
 7f444a838000-7f444a839000 r-xp 00017000 08:01 28574115                   /lib/x86_64-linux-gnu/libpthread-2.17.so
 7f444a839000-7f444a83a000 rwxp 00018000 08:01 28574115                   /lib/x86_64-linux-gnu/libpthread-2.17.so
 7f444a83a000-7f444a83e000 rwxp 00000000 00:00 0 
 7f444a83e000-7f444a852000 r-xp 00000000 08:01 28574215                   /lib/x86_64-linux-gnu/libgcc_s.so.1
 7f444a852000-7f444aa52000 ---p 00014000 08:01 28574215                   /lib/x86_64-linux-gnu/libgcc_s.so.1
 7f444aa52000-7f444aa53000 r-xp 00014000 08:01 28574215                   /lib/x86_64-linux-gnu/libgcc_s.so.1
 7f444aa53000-7f444aa54000 rwxp 00015000 08:01 28574215                   /lib/x86_64-linux-gnu/libgcc_s.so.1
 7f444aa54000-7f444ad04000 r-xp 00000000 08:01 20975316                   /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18.0.0
 7f444ad04000-7f444af03000 ---p 002b0000 08:01 20975316                   /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18.0.0
 7f444af03000-7f444af09000 r-xp 002af000 08:01 20975316                   /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18.0.0
 7f444af09000-7f444af87000 rwxp 002b5000 08:01 20975316                   /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18.0.0
 7f444af87000-7f444af8c000 rwxp 00000000 00:00 0 Abortado (imagem do nĂșcleo gravada) 

Anybody have any idea about this error.

Thanks



98.9k

hi, what version of Phacon are you using?

Hi, I use the latest one, 1.2.3 Thanks for your attention



98.9k

Could you try with 1.3.0?

Yes, I installed the version 1.3.0, but the error remains the same.

[email protected]:~/Documentos/Ferramentas/cphalcon/build$ php -a
Interactive shell

php > echo Phalcon\Version::get();
1.3.0 BETA 1php > exit
*** Error in `php': free(): invalid pointer: 0x00007f3f035a9340 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x80a46)[0x7f3f0652ba46]
/usr/local/lib/php/extensions/debug-zts-20121212/phalcon.so(+0x2c75cc)[0x7f3f0452b5cc]
php(ts_free_id+0x183)[0xbed37a]
php[0xd1be92]
php[0xd2a0a8]
php(zend_hash_graceful_reverse_destroy+0x69)[0xd2a363]
php(zend_destroy_modules+0x43)[0xd18b93]
php[0xd0913e]
php(php_module_shutdown+0x91)[0xbfc5c8]
php[0xe38658]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7f3f064ccea5]
php[0x438d45]

Thanks

Could you please try to run php under valgrind?

USE_ZEND_ALLOC=0 valgrind php -v

and post the output here (or better yet, file a bug report at GitHub and paste the output there).

Thank you in advance.

No problem, I done at this moment a request issues in the github with the detailed log output .

Thanks