[PHP-BUG] Bug #60825 [NEW]: Segfault when running symfony 2 tests

2012-01-20 Thread php at wallbash dot com
From: 
Operating system: Ubuntu 10.04.3 LTS
PHP version:  5.4.0RC6
Package:  Reproducible crash
Bug Type: Bug
Bug description:Segfault when running symfony 2 tests

Description:

First off: Sorry not being able to provide a better reproduce. I tried to
dig into symfony but failed as I'm not familiar with it. I was testing
phpunit against frameworks when I found this.

Running the symfony 2 test suite with RC6 leads to a segfault that I had
across two machines so I'll open this just in case it helps out and ask sf
people to maybe provide a better reproduce.

PHP Configure: Configure Command =>  './configure'  '--enable-mbstring'
'--with-readline' '--enable-pcntl' '--with-zlib'
'--prefix=/opt/php-5.4.0RC6/' '--enable-debug'


Test script:
---
git clone git://github.com/symfony/symfony.git

cd symfony

./vendors.php

/opt/php-5.4.0RC6/bin/php `which phpunit` --debug --filter FormLoginTest


Expected result:

No segfault

Actual result:
--
Configuration read from
/home/edo/Desktop/PHP/phpunit-dev/phpunit-testing-with-frameworks/vendor/symfony/phpunit.xml.dist


Starting test
'Symfony\Bundle\SecurityBundle\Tests\Functional\FormLoginTest::testFormLogin
with data set #0 ('config.yml')'.
Segmentation fault (core dumped)


(gdb) bt
#0  _zend_mm_free_int (heap=0x1a85310, p=0x7fff9c786460) at
/home/edo/Desktop/PHP/php-5.4.0RC6/Zend/zend_alloc.c:2100
#1  0x006be6cd in zend_call_function (fci=0x7fff9c786210,
fci_cache=) at
/home/edo/Desktop/PHP/php-5.4.0RC6/Zend/zend_execute_API.c:1019
#2  0x006e06ff in zend_call_method (object_pp=0x7fff9c786338,
obj_ce=0x5f4a370, fn_proxy=0x5f4a4d8, function_name=0xaa65b0 "__tostring",
function_name_len=3, retval_ptr_ptr=, param_count=0,
arg1=0x0, 
arg2=0x0) at
/home/edo/Desktop/PHP/php-5.4.0RC6/Zend/zend_interfaces.c:97
#3  0x006ebb11 in zend_std_cast_object_tostring
(readobj=0x7fff9c786460, writeobj=0x7fff9c786390, type=) at
/home/edo/Desktop/PHP/php-5.4.0RC6/Zend/zend_object_handlers.c:1494
#4  0x006c2ad0 in _convert_to_string (op=0x1a85310) at
/home/edo/Desktop/PHP/php-5.4.0RC6/Zend/zend_operators.c:588
#5  0x0071212a in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER
(execute_data=0x7f33c5361908) at
/home/edo/Desktop/PHP/php-5.4.0RC6/Zend/zend_vm_execute.h:27073
#6  0x00730010 in execute (op_array=0x5f4c280) at
/home/edo/Desktop/PHP/php-5.4.0RC6/Zend/zend_vm_execute.h:410
#7  0x006be773 in zend_call_function (fci=0x7fff9c786660,
fci_cache=) at
/home/edo/Desktop/PHP/php-5.4.0RC6/Zend/zend_execute_API.c:958
#8  0x005c4020 in zim_reflection_method_invokeArgs (ht=, return_value=0x58193d0, return_value_ptr=, this_ptr=, return_value_used=)
at
/home/edo/Desktop/PHP/php-5.4.0RC6/ext/reflection/php_reflection.c:2926
#9  0x00742c5c in zend_do_fcall_common_helper_SPEC
(execute_data=0x7f33c53604c0) at
/home/edo/Desktop/PHP/php-5.4.0RC6/Zend/zend_vm_execute.h:642
#10 0x00730010 in execute (op_array=0x5c12cd8) at
/home/edo/Desktop/PHP/php-5.4.0RC6/Zend/zend_vm_execute.h:410
#11 0x006c8d5a in zend_execute_scripts (type=8, retval=, file_count=3) at
/home/edo/Desktop/PHP/php-5.4.0RC6/Zend/zend.c:1272
#12 0x0066de5d in php_execute_script (primary_file=) at /home/edo/Desktop/PHP/php-5.4.0RC6/main/main.c:2476
#13 0x00770757 in do_cli (argc=0, argv=) at
/home/edo/Desktop/PHP/php-5.4.0RC6/sapi/cli/php_cli.c:983
#14 0x00770e64 in main (argc=, argv=) at
/home/edo/Desktop/PHP/php-5.4.0RC6/sapi/cli/php_cli.c:1356



-- 
Edit bug report at https://bugs.php.net/bug.php?id=60825&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=60825&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=60825&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=60825&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=60825&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60825&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=60825&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=60825&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=60825&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=60825&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=60825&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=60825&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=60825&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=60825&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=60825&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=60825&r=php4
Daylight Savings:

Bug #60825 [Com]: Segfault when running symfony 2 tests

2012-01-20 Thread php at wallbash dot com
Edit report at https://bugs.php.net/bug.php?id=60825&edit=1

 ID: 60825
 Comment by:     php at wallbash dot com
 Reported by:    php at wallbash dot com
 Summary:Segfault when running symfony 2 tests
 Status: Critical
 Type:   Bug
 Package:Reproducible crash
 Operating System:   Ubuntu 10.04.3 LTS
 PHP Version:5.4.0RC6
 Assigned To:stas
 Block user comment: N
 Private report: N

 New Comment:

Yes. It is that function that cases the crash rasmus.

Compiling php-5.4 from current SVN the tests run just fine :)

Regards,
Edorian


Previous Comments:

[2012-01-21 05:23:50] ras...@php.net

Can you try reproducing with the current svn code?
I went through the reproduce steps and the unit tests ran to completion for me.

However, under Valgrind I did get some complaints for one of the tests. Can you 
tell if your crash is on this same test?

Starting test 
'Symfony\Bundle\SecurityBundle\Tests\Functional\FormLoginTest::testFormLogin 
with data set #0 ('config.yml')'.
==24587== Conditional jump or move depends on uninitialised value(s)
==24587==at 0x9DE434: zend_call_function (zend_execute_API.c:925)
==24587==by 0xA128C3: zend_call_method (zend_interfaces.c:97)
==24587==by 0xA2BAE6: zend_std_cast_object_tostring 
(zend_object_handlers.c:1494)
==24587==by 0x9E582A: _convert_to_string (zend_operators.c:588)
==24587==by 0xB05BB6: ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER 
(zend_vm_execute.h:27073)
==24587==by 0xA342CC: execute (zend_vm_execute.h:410)
==24587==by 0x9DE67C: zend_call_function (zend_execute_API.c:958)
==24587==by 0x74F4C9: zim_reflection_method_invokeArgs 
(php_reflection.c:2926)
==24587==by 0xA35C22: zend_do_fcall_common_helper_SPEC 
(zend_vm_execute.h:642)
==24587==by 0xA36C1E: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER 
(zend_vm_execute.h:752)
==24587==by 0xA342CC: execute (zend_vm_execute.h:410)
==24587==by 0x9F2AEF: zend_execute_scripts (zend.c:1272)
==24587== 
==24587== Conditional jump or move depends on uninitialised value(s)
==24587==at 0x9DBB70: _zval_ptr_dtor (zend_execute_API.c:433)
==24587==by 0x9DED15: zend_call_function (zend_execute_API.c:1019)
==24587==by 0xA128C3: zend_call_method (zend_interfaces.c:97)
==24587==by 0xA2BAE6: zend_std_cast_object_tostring 
(zend_object_handlers.c:1494)
==24587==by 0x9E582A: _convert_to_string (zend_operators.c:588)
==24587==by 0xB05BB6: ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER 
(zend_vm_execute.h:27073)
==24587==by 0xA342CC: execute (zend_vm_execute.h:410)
==24587==by 0x9DE67C: zend_call_function (zend_execute_API.c:958)
==24587==by 0x74F4C9: zim_reflection_method_invokeArgs 
(php_reflection.c:2926)
==24587==by 0xA35C22: zend_do_fcall_common_helper_SPEC 
(zend_vm_execute.h:642)
==24587==by 0xA36C1E: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER 
(zend_vm_execute.h:752)
==24587==by 0xA342CC: execute (zend_vm_execute.h:410)
==24587== 
==24587== Conditional jump or move depends on uninitialised value(s)
==24587==at 0x9DBC28: _zval_ptr_dtor (zend_execute_API.c:444)
==24587==by 0x9DED15: zend_call_function (zend_execute_API.c:1019)
==24587==by 0xA128C3: zend_call_method (zend_interfaces.c:97)
==24587==by 0xA2BAE6: zend_std_cast_object_tostring 
(zend_object_handlers.c:1494)
==24587==by 0x9E582A: _convert_to_string (zend_operators.c:588)
==24587==by 0xB05BB6: ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER 
(zend_vm_execute.h:27073)
==24587==by 0xA342CC: execute (zend_vm_execute.h:410)
==24587==by 0x9DE67C: zend_call_function (zend_execute_API.c:958)
==24587==by 0x74F4C9: zim_reflection_method_invokeArgs 
(php_reflection.c:2926)
==24587==by 0xA35C22: zend_do_fcall_common_helper_SPEC 
(zend_vm_execute.h:642)
==24587==by 0xA36C1E: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER 
(zend_vm_execute.h:752)
==24587==by 0xA342CC: execute (zend_vm_execute.h:410)


[2012-01-21 04:59:45] ras...@php.net

Stas, this looks like a blocker for 5.4

----
[2012-01-20 20:20:21] php at wallbash dot com

Description:

First off: Sorry not being able to provide a better reproduce. I tried to dig 
into symfony but failed as I'm not familiar with it. I was testing phpunit 
against frameworks when I found this.

Running the symfony 2 test suite with RC6 leads to a segfault that I had across 
two machines so I'll open this just in case it helps out and ask sf people to 
maybe provide a better reproduce.

PHP Configure: Configure Command =>  './configure'  '--enable-mbstring' 
'--with-readline' '--enable-pcntl' '--with-zlib' '--prefix=/opt/php-5.4.0RC6/' 
'--enable-debug'


Test 

Bug #60825 [Csd->Opn]: Segfault when running symfony 2 tests

2012-05-22 Thread php at wallbash dot com
Edit report at https://bugs.php.net/bug.php?id=60825&edit=1

 ID: 60825
 User updated by:    php at wallbash dot com
 Reported by:    php at wallbash dot com
 Summary:Segfault when running symfony 2 tests
-Status: Closed
+Status: Open
 Type:   Bug
 Package:Reproducible crash
 Operating System:   Ubuntu 10.04.3 LTS
 PHP Version:5.4.0RC6
 Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

Dear paj...@php.net,

Sorry for answering so late. I focused my attention on other projects still now 
and did not check if the issue was solved using an higher production version. 
It 
seems the issue still exists with current stable version 5.3.13. I get the same 
segmentation fault when testing a project using Doctrine ORM. However, the 
fault 
location seems to elsewhere. See below.

$ php --version
PHP 5.3.13 (cli) (built: May  8 2012 15:39:23) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

$ gdb --args php /usr/local/bin/phpunit test
GNU gdb (GDB) CentOS (7.0.1-42.el5.centos)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/php...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/php /usr/local/bin/phpunit test
[Thread debugging using libthread_db enabled]
PHPUnit 3.6.10 by Sebastian Bergmann.

...
Program received signal SIGSEGV, Segmentation fault.
0x00652700 in ?? ()
(gdb) bt
#0  0x00652700 in ?? ()
#1  0x2aaab147ae4c in ?? () from /usr/lib64/php/modules/pdo.so
#2  0x00692bcd in ?? ()
#3  0x0065876b in execute ()
#4  0x00627043 in zend_call_function ()
#5  0x0064830f in zend_call_method ()
#6  0x006507e8 in zend_objects_destroy_object ()
#7  0x0064ea3c in gc_collect_cycles ()
#8  0x0064f00e in gc_zval_possible_root ()
#9  0x006b51ed in ?? ()
#10 0x0065876b in execute ()
#11 0x00627043 in zend_call_function ()
#12 0x00535fbe in ?? ()
#13 0x00659669 in ?? ()
#14 0x0065876b in execute ()
#15 0x00631ba5 in zend_execute_scripts ()
#16 0x005e1328 in php_execute_script ()
#17 0x006bbdf0 in ?? ()
#18 0x2b7cb994 in __libc_start_main () from /lib64/libc.so.6
#19 0x00422509 in _start ()


Previous Comments:

[2012-04-18 09:46:28] larue...@php.net

Automatic comment on behalf of laruence
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=cf54cc736bc27f18b9a27ed882ad87b1d2e7a2b3
Log: Fixed bug #60825 (Segfault when running symfony 2 tests)


[2012-04-18 09:46:25] larue...@php.net

Automatic comment on behalf of laruence
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=a222954a45df7af796e3c890075010bf0213773b
Log: Re-fixed bug #60825 (Segfault when running symfony 2 tests)


[2012-04-18 09:46:24] larue...@php.net

Automatic comment on behalf of laruence
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=498d9aea7f1ac60ccefd0de5e5d854c27d603900
Log: Fixed bug #60825 (Segfault when running symfony 2 tests)


[2012-03-15 10:26:16] paj...@php.net

@maxime dot marais at gmail dot com

Please try yourself using the snapshots. But as far as I can see the fix has 
been 
applied to 5.3, so it should work with the snaps.


[2012-03-15 10:04:13] maxime dot marais at gmail dot com

Could you please tell if the fix applied to version 5.4 will be applied to 
version 5.3 (maybe 5.3.11)? I am experiencing the same issue with PHP 5.3.6 
using some test classes bases on PHPUnit and Symfony's ORM Doctrine. 

In the example below, 3 test classes are tested sequentially. If I run each 
test 
individually, no segmentation fault occurs.

$ gdb --args php /usr/local/bin/phpunit test
GNU gdb (GDB) CentOS (7.0.1-42.el5.centos)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty&quo

Bug #60825 [Fbk->Asn]: Segfault when running symfony 2 tests

2012-05-23 Thread php at wallbash dot com
Edit report at https://bugs.php.net/bug.php?id=60825&edit=1

 ID: 60825
 User updated by:    php at wallbash dot com
 Reported by:    php at wallbash dot com
 Summary:Segfault when running symfony 2 tests
-Status: Feedback
+Status: Assigned
 Type:   Bug
 Package:Reproducible crash
 Operating System:   Ubuntu 10.04.3 LTS
 PHP Version:5.4.0RC6
 Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

I will take time to create a reproducible test on Saturday or Sunday. This 
looks 
like a kind a memory related issue as I can run each test individually, but not 
all tests in a batch. Trying to know more precisely what makes the process fail 
in scripts, I also installed XDebug extension. Here, a segmentation fault 
occurs 
when XDebug tries to write its coverage file. I hope this is not some kind of 
heap overflow that may introduce some vulnerability (ie. arbitrary code 
execution).

Follows a debugger dump when only one script is run with XDebug activated and 
coverage asked. An output file cover.txt is created but remains empty. The 
fault 
now seems to occur next to a call in XDebug Extension.  -- DUMP #1 --

If I try to run all the tests with XDebug activated and coverage asked, a 
segmentation fault still occurs but the back trace is now different, the 
segmentation fault now seems to occur next to a call in pdo.so -- DUMP #2 --

If I now try to run another single test with XDebug activated and coverage 
asked, a segmentation fault occurs again but the back trace is also different, 
the segmentation fault seems to occur also next to a call in pdo.so -- DUMP #3 -
-

$ php --version
PHP 5.3.13 (cli) (built: May  8 2012 15:39:23) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with Xdebug v2.2.0, Copyright (c) 2002-2012, by Derick Rethans


DUMPS come in next comments in order not to get the "Please do not SPAM our bug 
system." error message.


Previous Comments:

[2012-05-23 02:22:05] larue...@php.net

oh,, I remebered wronly, will take a look into this later,  but the new 
segfault 
seems not the same as this one(from the bt),  could you please try to make a 
reproducable script?  thanks


[2012-05-23 02:18:15] larue...@php.net

seems the same issue exists in 5.3 too, previous fix only fixed the bug in 5.4


[2012-05-22 14:05:51] php at wallbash dot com

Dear paj...@php.net,

Sorry for answering so late. I focused my attention on other projects still now 
and did not check if the issue was solved using an higher production version. 
It 
seems the issue still exists with current stable version 5.3.13. I get the same 
segmentation fault when testing a project using Doctrine ORM. However, the 
fault 
location seems to elsewhere. See below.

$ php --version
PHP 5.3.13 (cli) (built: May  8 2012 15:39:23) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

$ gdb --args php /usr/local/bin/phpunit test
GNU gdb (GDB) CentOS (7.0.1-42.el5.centos)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/php...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/php /usr/local/bin/phpunit test
[Thread debugging using libthread_db enabled]
PHPUnit 3.6.10 by Sebastian Bergmann.

...
Program received signal SIGSEGV, Segmentation fault.
0x00652700 in ?? ()
(gdb) bt
#0  0x00652700 in ?? ()
#1  0x2aaab147ae4c in ?? () from /usr/lib64/php/modules/pdo.so
#2  0x00692bcd in ?? ()
#3  0x0065876b in execute ()
#4  0x00627043 in zend_call_function ()
#5  0x0064830f in zend_call_method ()
#6  0x006507e8 in zend_objects_destroy_object ()
#7  0x0064ea3c in gc_collect_cycles ()
#8  0x0064f00e in gc_zval_possible_root ()
#9  0x006b51ed in ?? ()
#10 0x0065876b in execute ()
#11 0x00627043 in zend_call_function ()
#12 0x00535fbe in ?? ()
#13 0x00659669 in ?? ()
#14 0x0065876b in execute ()
#15 0x00631ba5 in zend_execute_scripts ()
#16 0x005e1328 in php_execute_script ()
#17 0x006bbdf0 in ?? ()
#18 0x2b7cb994 in __libc_start_main (

Bug #60825 [Asn]: Segfault when running symfony 2 tests

2012-05-23 Thread php at wallbash dot com
Edit report at https://bugs.php.net/bug.php?id=60825&edit=1

 ID: 60825
 User updated by:    php at wallbash dot com
 Reported by:    php at wallbash dot com
 Summary:Segfault when running symfony 2 tests
 Status: Assigned
 Type:   Bug
 Package:Reproducible crash
 Operating System:   Ubuntu 10.04.3 LTS
 PHP Version:5.4.0RC6
 Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

- DUMP #1 -

$ gdb --args php /usr/local/bin/phpunit --coverage-text=cover.txt 
test/PersistTest.php 
test/InstanciationTest.php 
GNU gdb (GDB) CentOS (7.0.1-42.el5.centos)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/php...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/php /usr/local/bin/phpunit --coverage-text=cover.txt 
test/PersistTest.php
[Thread debugging using libthread_db enabled]
PHPUnit 3.6.10 by Sebastian Bergmann.



Time: 21 seconds, Memory: 21.75Mb

OK (12 tests, 59 assertions)

Generating textual code coverage report, this may take a moment.
Program received signal SIGSEGV, Segmentation fault.
0x00651c85 in ?? ()
(gdb) bt
#0  0x00651c85 in ?? ()
#1  0x00672eee in ?? ()
#2  0x0065876b in execute ()
#3  0x2f570f4f in xdebug_execute (op_array=0x17fe050)
at /tmp/pear/install/xdebug/xdebug.c:1390
#4  0x0065915d in ?? ()
#5  0x0065876b in execute ()
#6  0x2f570f4f in xdebug_execute (op_array=0x17e3168)
at /tmp/pear/install/xdebug/xdebug.c:1390
#7  0x0065915d in ?? ()
#8  0x0065876b in execute ()
#9  0x2f570f4f in xdebug_execute (op_array=0x17ae2c8)
at /tmp/pear/install/xdebug/xdebug.c:1390
#10 0x0065915d in ?? ()
#11 0x0065876b in execute ()
#12 0x2f570f4f in xdebug_execute (op_array=0x1f64700)
at /tmp/pear/install/xdebug/xdebug.c:1390
#13 0x0065915d in ?? ()
#14 0x0065876b in execute ()
#15 0x2f570f4f in xdebug_execute (op_array=0x1f64be8)
at /tmp/pear/install/xdebug/xdebug.c:1390
#16 0x00627043 in zend_call_function ()
#17 0x0064830f in zend_call_method ()
---Type  to continue, or q  to quit---
#18 0x006507e8 in zend_objects_destroy_object ()
#19 0x0064ea3c in gc_collect_cycles ()
#20 0x0064f00e in gc_zval_possible_root ()
#21 0x006b9031 in ?? ()
#22 0x0065876b in execute ()
#23 0x2f570f4f in xdebug_execute (op_array=0x22f8c90)
at /tmp/pear/install/xdebug/xdebug.c:1390
#24 0x0065915d in ?? ()
#25 0x0065876b in execute ()
#26 0x2f570f4f in xdebug_execute (op_array=0x22d3498)
at /tmp/pear/install/xdebug/xdebug.c:1390
#27 0x0065915d in ?? ()
#28 0x0065876b in execute ()
#29 0x2f570f4f in xdebug_execute (op_array=0x22dec68)
at /tmp/pear/install/xdebug/xdebug.c:1390
#30 0x0065915d in ?? ()
#31 0x0065876b in execute ()
#32 0x2f570f4f in xdebug_execute (op_array=0x2ac24700)
at /tmp/pear/install/xdebug/xdebug.c:1390
#33 0x0065915d in ?? ()
#34 0x0065876b in execute ()
#35 0x2f570f4f in xdebug_execute (op_array=0x22d6a60)
at /tmp/pear/install/xdebug/xdebug.c:1390
---Type  to continue, or q  to quit---
#36 0x0065915d in ?? ()
#37 0x0065876b in execute ()
#38 0x2f570f4f in xdebug_execute (op_array=0x2141e58)
at /tmp/pear/install/xdebug/xdebug.c:1390
#39 0x0065915d in ?? ()
#40 0x0065876b in execute ()
#41 0x2f570f4f in xdebug_execute (op_array=0x2142fb0)
at /tmp/pear/install/xdebug/xdebug.c:1390
#42 0x0065915d in ?? ()
#43 0x0065876b in execute ()
#44 0x2f570f4f in xdebug_execute (op_array=0x2142fb0)
at /tmp/pear/install/xdebug/xdebug.c:1390
#45 0x0065915d in ?? ()
#46 0x0065876b in execute ()
#47 0x2f570f4f in xdebug_execute (op_array=0x2142fb0)
at /tmp/pear/install/xdebug/xdebug.c:1390
#48 0x0065915d in ?? ()
#49 0x0065876b in execute ()
#50 0x2f570f4f in xdebug_execute (op_array=0x2142fb0)
at /tmp/pear/install/xdebug/xdebug.c:1390
#51 0x0065915d in ?? ()
#52 0x0065876b in execute ()
#53 0x2f570f4f in xdebug_execute (op_array=0x21418d8)
---Type  to continue, or q  to quit---
at /tmp/pear/install/xdebug/xdebug.c:1390
#54 0x0065915d in ?? ()
#55 0x0065876b in execute ()
#56 0x2aaa

Bug #60825 [Asn]: Segfault when running symfony 2 tests

2012-05-23 Thread php at wallbash dot com
Edit report at https://bugs.php.net/bug.php?id=60825&edit=1

 ID: 60825
 User updated by:    php at wallbash dot com
 Reported by:    php at wallbash dot com
 Summary:Segfault when running symfony 2 tests
 Status: Assigned
 Type:   Bug
 Package:Reproducible crash
 Operating System:   Ubuntu 10.04.3 LTS
 PHP Version:5.4.0RC6
 Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

- DUMP #2 -

$ gdb --args php /usr/local/bin/phpunit --coverage-text=cover.txt test
GNU gdb (GDB) CentOS (7.0.1-42.el5.centos)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/php...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/php /usr/local/bin/phpunit --coverage-text=cover.txt 
test
[Thread debugging using libthread_db enabled]
PHPUnit 3.6.10 by Sebastian Bergmann.

.
Program received signal SIGSEGV, Segmentation fault.
0x00652700 in ?? ()
(gdb) bt
#0  0x00652700 in ?? ()
#1  0x2aaab16abe4c in ?? () from /usr/lib64/php/modules/pdo.so
#2  0x00692bcd in ?? ()
#3  0x0065876b in execute ()
#4  0x2f570f4f in xdebug_execute (op_array=0x2aaab428b5d8) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#5  0x0065915d in ?? ()
#6  0x0065876b in execute ()
#7  0x2f570f4f in xdebug_execute (op_array=0x1c63328) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#8  0x0065915d in ?? ()
#9  0x0065876b in execute ()
#10 0x2f570f4f in xdebug_execute (op_array=0x1c29480) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#11 0x0065915d in ?? ()
#12 0x0065876b in execute ()
#13 0x2f570f4f in xdebug_execute (op_array=0x1c24b10) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#14 0x00627043 in zend_call_function ()
#15 0x0064830f in zend_call_method ()
#16 0x006507e8 in zend_objects_destroy_object ()
#17 0x0064ea3c in gc_collect_cycles ()
#18 0x0064f00e in gc_zval_possible_root ()
#19 0x0067b264 in ?? ()
#20 0x0065876b in execute ()
#21 0x2f570f4f in xdebug_execute (op_array=0x1a26d38) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#22 0x0065915d in ?? ()
#23 0x0065876b in execute ()
#24 0x2f570f4f in xdebug_execute (op_array=0xee1008) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#25 0x0065915d in ?? ()
#26 0x0065876b in execute ()
#27 0x2f570f4f in xdebug_execute (op_array=0xfa0e28) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#28 0x0065915d in ?? ()
#29 0x0065876b in execute ()
#30 0x2f570f4f in xdebug_execute (op_array=0xf9e000) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#31 0x0065915d in ?? ()
#32 0x0065876b in execute ()
#33 0x2f570f4f in xdebug_execute (op_array=0xf635d0) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#34 0x0065915d in ?? ()
#35 0x0065876b in execute ()
#36 0x2f570f4f in xdebug_execute (op_array=0x10877e0) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#37 0x0065915d in ?? ()
#38 0x0065876b in execute ()
#39 0x2f570f4f in xdebug_execute (op_array=0x1bb08e8) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#40 0x0065915d in ?? ()
#41 0x0065876b in execute ()
#42 0x2f570f4f in xdebug_execute (op_array=0x1bc2610) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#43 0x0065915d in ?? ()
#44 0x0065876b in execute ()
#45 0x2f570f4f in xdebug_execute (op_array=0x1baf8a0) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#46 0x0065915d in ?? ()
#47 0x0065876b in execute ()
#48 0x2f570f4f in xdebug_execute (op_array=0x1c1d658) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#49 0x0065915d in ?? ()
#50 0x0065876b in execute ()
#51 0x2f570f4f in xdebug_execute (op_array=0x17e6270) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#52 0x0065915d in ?? ()
#53 0x0065876b in execute ()
#54 0x2f570f4f in xdebug_execute (op_array=0x17e5898) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#55 0x0065915d in ?? ()
#56 0x0065876b in execute ()
#57 0x2f570f4f in xdebug_execute (op_array=0x1775330) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#58 0x0065915d in ?? ()
---Type  to continue, or q  to quit---
#59 0x0065876b in execute ()
#60 0x2f570f4f in xdebug_execute (op_array=0xd0c5f8) at 
/tmp/pear/install/xdebug/xdebug.c:139

Bug #60825 [Asn]: Segfault when running symfony 2 tests

2012-05-23 Thread php at wallbash dot com
Edit report at https://bugs.php.net/bug.php?id=60825&edit=1

 ID: 60825
 User updated by:    php at wallbash dot com
 Reported by:    php at wallbash dot com
 Summary:Segfault when running symfony 2 tests
 Status: Assigned
 Type:   Bug
 Package:Reproducible crash
 Operating System:   Ubuntu 10.04.3 LTS
 PHP Version:5.4.0RC6
 Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

- DUMP #3 -


$ gdb --args php /usr/local/bin/phpunit --coverage-text=cover.txt 
test/InstanciationTest.php 
GNU gdb (GDB) CentOS (7.0.1-42.el5.centos)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/php...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/php /usr/local/bin/phpunit --coverage-text=cover.txt 
test/InstanciationTest.php
[Thread debugging using libthread_db enabled]
PHPUnit 3.6.10 by Sebastian Bergmann.

.

Time: 4 seconds, Memory: 21.00Mb

OK (13 tests, 71 assertions)

Generating textual code coverage report, this may take a moment.
Program received signal SIGSEGV, Segmentation fault.
0x00652700 in ?? ()
(gdb) bt
#0  0x00652700 in ?? ()
#1  0x2aaab16abe4c in ?? () from /usr/lib64/php/modules/pdo.so
#2  0x00692bcd in ?? ()
#3  0x0065876b in execute ()
#4  0x2f570f4f in xdebug_execute (op_array=0x2aaab428c878) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#5  0x0065915d in ?? ()
#6  0x0065876b in execute ()
#7  0x2f570f4f in xdebug_execute (op_array=0x179f520) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#8  0x0065915d in ?? ()
#9  0x0065876b in execute ()
#10 0x2f570f4f in xdebug_execute (op_array=0x1513890) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#11 0x0065915d in ?? ()
#12 0x0065876b in execute ()
#13 0x2f570f4f in xdebug_execute (op_array=0x1986ea8) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#14 0x00627043 in zend_call_function ()
#15 0x0064830f in zend_call_method ()
#16 0x006507e8 in zend_objects_destroy_object ()
#17 0x0064ea3c in gc_collect_cycles ()
#18 0x0064f00e in gc_zval_possible_root ()
#19 0x006b9031 in ?? ()
#20 0x0065876b in execute ()
#21 0x2f570f4f in xdebug_execute (op_array=0x21dedc0) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#22 0x0065915d in ?? ()
#23 0x0065876b in execute ()
#24 0x2f570f4f in xdebug_execute (op_array=0x21de378) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#25 0x0065915d in ?? ()
#26 0x0065876b in execute ()
#27 0x2f570f4f in xdebug_execute (op_array=0x21b9718) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#28 0x0065915d in ?? ()
#29 0x0065876b in execute ()
#30 0x2f570f4f in xdebug_execute (op_array=0x2ac245b0) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#31 0x0065915d in ?? ()
#32 0x0065876b in execute ()
#33 0x2f570f4f in xdebug_execute (op_array=0x2086cd0) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#34 0x0065915d in ?? ()
#35 0x0065876b in execute ()
#36 0x2f570f4f in xdebug_execute (op_array=0x208d828) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#37 0x0065915d in ?? ()
#38 0x0065876b in execute ()
#39 0x2f570f4f in xdebug_execute (op_array=0x1f90600) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#40 0x0065915d in ?? ()
#41 0x0065876b in execute ()
#42 0x2f570f4f in xdebug_execute (op_array=0x1f90600) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#43 0x0065915d in ?? ()
#44 0x0065876b in execute ()
#45 0x2f570f4f in xdebug_execute (op_array=0x1f90600) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#46 0x0065915d in ?? ()
#47 0x0065876b in execute ()
#48 0x2f570f4f in xdebug_execute (op_array=0x1f90600) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#49 0x0065915d in ?? ()
#50 0x0065876b in execute ()
#51 0x2f570f4f in xdebug_execute (op_array=0x1fd8f10) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#52 0x0065915d in ?? ()
#53 0x0065876b in execute ()
#54 0x2f570f4f in xdebug_execute (op_array=0x1312110) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#55 0x0065915d in ?? ()
#56 0x0065876b in execute ()
#57 0x2f570f4f in xdebug_execute (op_array=0x1fda010) at 
/tmp/pear/install/xdebug/xdebug.c:1390
#58 0x0065915

[PHP-BUG] Bug #63055 [NEW]: Segfault in zend_gc with SF2 testsuite

2012-09-10 Thread php at wallbash dot com
From: php at wallbash dot com
Operating system: CentOS 6.3
PHP version:  5.4.6
Package:  *General Issues
Bug Type: Bug
Bug description:Segfault in zend_gc with SF2 testsuite

Description:

Reproduceable with php-master & 5.4.6

I'm sorry for not being able to break that down. Only running the
segfaulting test works without an issue and even generating more output
during the execution doesn't lead to the issue :(

The best I can come with is providing all the instructions to run the whole
thing.

Configure: 

'./configure'  '--prefix=/opt/php-master' '--without-pear' '--with-zlib'
'--with-xsl' '--enable-debug'

Test script:
---
git clone https://github.com/symfony/symfony.git
git checkout 4dc197c3e1ea227e36cab7ea93877fa44ecc569b
curl -s http://getcomposer.org/installer | php
COMPOSER_ROOT_VERSION=dev-master php composer.phar --dev install
php src/Symfony/Component/Locale/Resources/data/build-data.php
export USE_INTL_ICU_DATA_VERSION=1

pear config-set auto_discover 1
pear install --alldeps pear.phpunit.de/phpunit-3.7.0RC3
pear install --alldeps pear.phpunit.de/php_codecoverage-1.2.0RC3
pear install --alldeps pear.phpunit.de/punit_mockobject-1.2.0RC4

phpunit

Expected result:

No segfault

Actual result:
--
Core with 5.4.6

CORE 5.4.6:
---

gdb /opt/php-5.4.6/bin/php /tmp/cores/core-php.17245 

This GDB was configured as "x86_64-redhat-linux-gnu".

Reading symbols from /opt/php-5.4.6/bin/php...done.
[New LWP 17245]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/opt/php-5.4.6/bin/php /usr/bin/phpunit'.
Program terminated with signal 11, Segmentation fault.
#0  0x007e493f in zval_mark_grey (pz=0x12adf328) at
/opt/php-5.4.6/Zend/zend_gc.c:425
425 pz = *(zval**)p->pData;
(gdb) bt
#0  0x007e493f in zval_mark_grey (pz=0x12adf328) at
/opt/php-5.4.6/Zend/zend_gc.c:425
#1  0x007e4c6e in gc_mark_roots () at
/opt/php-5.4.6/Zend/zend_gc.c:501
#2  0x007e57cd in gc_collect_cycles () at
/opt/php-5.4.6/Zend/zend_gc.c:793
#3  0x007e3e96 in gc_zval_possible_root (zv=0x12adf9e8) at
/opt/php-5.4.6/Zend/zend_gc.c:166
#4  0x007a689e in gc_zval_check_possible_root (z=0x12adf9e8) at
/opt/php-5.4.6/Zend/zend_gc.h:183
#5  _zval_ptr_dtor (zval_ptr=0x12adff00, __zend_filename=0xca8750
"/opt/php-5.4.6/Zend/zend_variables.c", __zend_lineno=180) at
/opt/php-5.4.6/Zend/zend_execute_API.c:448
#6  0x007b9354 in _zval_ptr_dtor_wrapper (zval_ptr=0x12adff00) at
/opt/php-5.4.6/Zend/zend_variables.c:180
#7  0x007cd5da in zend_hash_destroy (ht=0x12adf6a0) at
/opt/php-5.4.6/Zend/zend_hash.c:560
#8  0x007b8f19 in _zval_dtor_func (zvalue=0x12adf328,
__zend_filename=0x97e728 "/opt/php-5.4.6/ext/pcre/php_pcre.c",
__zend_lineno=550) at /opt/php-5.4.6/Zend/zend_variables.c:43
#9  0x0049daee in _zval_dtor (__zend_lineno=,
__zend_filename=0x97e728 "/opt/php-5.4.6/ext/pcre/php_pcre.c",
zvalue=0x12adf328)
at /opt/php-5.4.6/Zend/zend_variables.h:35
#10 php_pcre_match_impl (pce=0x5a32e10, 
subject=0x12adf4f0 "/**\n * Note that there are some values written
like -2147483647 - 1. This is the lower 32bit int max and is a known\n *
behavior of PHP.\n */\n/**\n * @dataProvider
formatCurrencyWithCurrencyStyleSwis"..., subject_len=225,
return_value=0x12adf740, subpats=0x12adf328, global=1, use_flags=0,
flags=0, start_offset=0)
at /opt/php-5.4.6/ext/pcre/php_pcre.c:550
#11 0x0049da3b in php_do_pcre_match (ht=3, return_value=0x12adf740,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, global=1) at
/opt/php-5.4.6/ext/pcre/php_pcre.c:520
#12 0x0049e850 in zif_preg_match_all (ht=3,
return_value=0x12adf740, return_value_ptr=0x0, this_ptr=0x0,
return_value_used=1) at /opt/php-5.4.6/ext/pcre/php_pcre.c:780
#13 0x007fa7cc in zend_do_fcall_common_helper_SPEC
(execute_data=0x7fc29eb16ea8) at /opt/php-5.4.6/Zend/zend_vm_execute.h:642
#14 0x00801854 in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0x7fc29eb16ea8) at
/opt/php-5.4.6/Zend/zend_vm_execute.h:2219
#15 0x007f91ab in execute (op_array=0x13b37c8) at
/opt/php-5.4.6/Zend/zend_vm_execute.h:410
#16 0x007bc486 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /opt/php-5.4.6/Zend/zend.c:1289
#17 0x00731340 in php_execute_script (primary_file=0x7fff1493dfb0)
at /opt/php-5.4.6/main/main.c:2473
#18 0x009020e2 in do_cli (argc=2, argv=0x7fff1493e368) at
/opt/php-5.4.6/sapi/cli/php_cli.c:988
#19 0x0090318a in main (argc=2, argv=0x7fff1493e368) at
/opt/php-5.4.6/sapi/cli/php_cli.c:1364

Core with master:

gdb /opt/php-master/bin/php /tmp/cores/core-php.22349 

This GDB was configured as "x86_64-re

Bug #63055 [Opn]: Segfault in zend_gc with SF2 testsuite

2012-09-10 Thread php at wallbash dot com
Edit report at https://bugs.php.net/bug.php?id=63055&edit=1

 ID: 63055
 User updated by:    php at wallbash dot com
 Reported by:    php at wallbash dot com
 Summary:Segfault in zend_gc with SF2 testsuite
 Status: Open
 Type:   Bug
 Package:*General Issues
 Operating System:   CentOS 6.3
 PHP Version:5.4.6
 Block user comment: N
 Private report: N

 New Comment:

Initially I ran into this issue with 5.3.16 but I didn't include a coredump for 
it. Just added it to make clear it might not be something new in 5.4

Regards,
Edorian


Previous Comments:

[2012-09-10 11:56:59] php at wallbash dot com

Description:

Reproduceable with php-master & 5.4.6

I'm sorry for not being able to break that down. Only running the segfaulting 
test works without an issue and even generating more output during the 
execution doesn't lead to the issue :(

The best I can come with is providing all the instructions to run the whole 
thing.

Configure: 

'./configure'  '--prefix=/opt/php-master' '--without-pear' '--with-zlib' 
'--with-xsl' '--enable-debug'

Test script:
---
git clone https://github.com/symfony/symfony.git
git checkout 4dc197c3e1ea227e36cab7ea93877fa44ecc569b
curl -s http://getcomposer.org/installer | php
COMPOSER_ROOT_VERSION=dev-master php composer.phar --dev install
php src/Symfony/Component/Locale/Resources/data/build-data.php
export USE_INTL_ICU_DATA_VERSION=1

pear config-set auto_discover 1
pear install --alldeps pear.phpunit.de/phpunit-3.7.0RC3
pear install --alldeps pear.phpunit.de/php_codecoverage-1.2.0RC3
pear install --alldeps pear.phpunit.de/punit_mockobject-1.2.0RC4

phpunit

Expected result:

No segfault

Actual result:
--
Core with 5.4.6

CORE 5.4.6:
---

gdb /opt/php-5.4.6/bin/php /tmp/cores/core-php.17245 

This GDB was configured as "x86_64-redhat-linux-gnu".

Reading symbols from /opt/php-5.4.6/bin/php...done.
[New LWP 17245]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/opt/php-5.4.6/bin/php /usr/bin/phpunit'.
Program terminated with signal 11, Segmentation fault.
#0  0x007e493f in zval_mark_grey (pz=0x12adf328) at 
/opt/php-5.4.6/Zend/zend_gc.c:425
425 pz = *(zval**)p->pData;
(gdb) bt
#0  0x007e493f in zval_mark_grey (pz=0x12adf328) at 
/opt/php-5.4.6/Zend/zend_gc.c:425
#1  0x007e4c6e in gc_mark_roots () at /opt/php-5.4.6/Zend/zend_gc.c:501
#2  0x007e57cd in gc_collect_cycles () at 
/opt/php-5.4.6/Zend/zend_gc.c:793
#3  0x007e3e96 in gc_zval_possible_root (zv=0x12adf9e8) at 
/opt/php-5.4.6/Zend/zend_gc.c:166
#4  0x007a689e in gc_zval_check_possible_root (z=0x12adf9e8) at 
/opt/php-5.4.6/Zend/zend_gc.h:183
#5  _zval_ptr_dtor (zval_ptr=0x12adff00, __zend_filename=0xca8750 
"/opt/php-5.4.6/Zend/zend_variables.c", __zend_lineno=180) at 
/opt/php-5.4.6/Zend/zend_execute_API.c:448
#6  0x007b9354 in _zval_ptr_dtor_wrapper (zval_ptr=0x12adff00) at 
/opt/php-5.4.6/Zend/zend_variables.c:180
#7  0x007cd5da in zend_hash_destroy (ht=0x12adf6a0) at 
/opt/php-5.4.6/Zend/zend_hash.c:560
#8  0x007b8f19 in _zval_dtor_func (zvalue=0x12adf328, 
__zend_filename=0x97e728 "/opt/php-5.4.6/ext/pcre/php_pcre.c", 
__zend_lineno=550) at /opt/php-5.4.6/Zend/zend_variables.c:43
#9  0x0049daee in _zval_dtor (__zend_lineno=, 
__zend_filename=0x97e728 "/opt/php-5.4.6/ext/pcre/php_pcre.c", 
zvalue=0x12adf328)
at /opt/php-5.4.6/Zend/zend_variables.h:35
#10 php_pcre_match_impl (pce=0x5a32e10, 
subject=0x12adf4f0 "/**\n * Note that there are some values written like 
-2147483647 - 1. This is the lower 32bit int max and is a known\n * behavior of 
PHP.\n */\n/**\n * @dataProvider formatCurrencyWithCurrencyStyleSwis"..., 
subject_len=225, return_value=0x12adf740, subpats=0x12adf328, global=1, 
use_flags=0, flags=0, start_offset=0)
at /opt/php-5.4.6/ext/pcre/php_pcre.c:550
#11 0x0049da3b in php_do_pcre_match (ht=3, return_value=0x12adf740, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, global=1) at 
/opt/php-5.4.6/ext/pcre/php_pcre.c:520
#12 0x0049e850 in zif_preg_match_all (ht=3, return_value=0x12adf740, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at 
/opt/php-5.4.6/ext/pcre/php_pcre.c:780
#13 0x007fa7cc in zend_do_fcall_common_helper_SPEC 
(execute_data=0x7fc29eb16ea8) at /opt/php-5.4.6/Zend/zend_vm_execute.h:642
#14 0x00801854 in ZEND_DO_FCALL_SPEC_CONST_HANDLER 
(execute_data=0x7fc29eb16ea8) at /opt/php-5.4.6/Zend/zend_vm_execute.h:2219
#15 0x007f91ab in execute (op_array=0x13b37c8) at 
/opt/php-5.4

Bug #63055 [Opn]: Segfault in zend_gc with SF2 testsuite

2012-09-10 Thread php at wallbash dot com
Edit report at https://bugs.php.net/bug.php?id=63055&edit=1

 ID: 63055
 User updated by:    php at wallbash dot com
 Reported by:    php at wallbash dot com
 Summary:Segfault in zend_gc with SF2 testsuite
 Status: Open
 Type:   Bug
 Package:*General Issues
 Operating System:   CentOS 6.3
 PHP Version:5.4.6
 Block user comment: N
 Private report: N

 New Comment:

He laruence,

i meant the segfault happens with 5.3.16, 5.4.6 and with master but I only 
included two coredumps.

The included coredump that produced a meaningful stacktrace is from 5.4.6 like 
noted.


Previous Comments:

[2012-09-10 12:24:42] larue...@php.net

you mean , you are running with 5.3?


[2012-09-10 12:19:49] php at wallbash dot com

Initially I ran into this issue with 5.3.16 but I didn't include a coredump for 
it. Just added it to make clear it might not be something new in 5.4

Regards,
Edorian


[2012-09-10 11:56:59] php at wallbash dot com

Description:

Reproduceable with php-master & 5.4.6

I'm sorry for not being able to break that down. Only running the segfaulting 
test works without an issue and even generating more output during the 
execution doesn't lead to the issue :(

The best I can come with is providing all the instructions to run the whole 
thing.

Configure: 

'./configure'  '--prefix=/opt/php-master' '--without-pear' '--with-zlib' 
'--with-xsl' '--enable-debug'

Test script:
---
git clone https://github.com/symfony/symfony.git
git checkout 4dc197c3e1ea227e36cab7ea93877fa44ecc569b
curl -s http://getcomposer.org/installer | php
COMPOSER_ROOT_VERSION=dev-master php composer.phar --dev install
php src/Symfony/Component/Locale/Resources/data/build-data.php
export USE_INTL_ICU_DATA_VERSION=1

pear config-set auto_discover 1
pear install --alldeps pear.phpunit.de/phpunit-3.7.0RC3
pear install --alldeps pear.phpunit.de/php_codecoverage-1.2.0RC3
pear install --alldeps pear.phpunit.de/punit_mockobject-1.2.0RC4

phpunit

Expected result:

No segfault

Actual result:
--
Core with 5.4.6

CORE 5.4.6:
---

gdb /opt/php-5.4.6/bin/php /tmp/cores/core-php.17245 

This GDB was configured as "x86_64-redhat-linux-gnu".

Reading symbols from /opt/php-5.4.6/bin/php...done.
[New LWP 17245]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/opt/php-5.4.6/bin/php /usr/bin/phpunit'.
Program terminated with signal 11, Segmentation fault.
#0  0x007e493f in zval_mark_grey (pz=0x12adf328) at 
/opt/php-5.4.6/Zend/zend_gc.c:425
425 pz = *(zval**)p->pData;
(gdb) bt
#0  0x007e493f in zval_mark_grey (pz=0x12adf328) at 
/opt/php-5.4.6/Zend/zend_gc.c:425
#1  0x007e4c6e in gc_mark_roots () at /opt/php-5.4.6/Zend/zend_gc.c:501
#2  0x007e57cd in gc_collect_cycles () at 
/opt/php-5.4.6/Zend/zend_gc.c:793
#3  0x007e3e96 in gc_zval_possible_root (zv=0x12adf9e8) at 
/opt/php-5.4.6/Zend/zend_gc.c:166
#4  0x007a689e in gc_zval_check_possible_root (z=0x12adf9e8) at 
/opt/php-5.4.6/Zend/zend_gc.h:183
#5  _zval_ptr_dtor (zval_ptr=0x12adff00, __zend_filename=0xca8750 
"/opt/php-5.4.6/Zend/zend_variables.c", __zend_lineno=180) at 
/opt/php-5.4.6/Zend/zend_execute_API.c:448
#6  0x007b9354 in _zval_ptr_dtor_wrapper (zval_ptr=0x12adff00) at 
/opt/php-5.4.6/Zend/zend_variables.c:180
#7  0x007cd5da in zend_hash_destroy (ht=0x12adf6a0) at 
/opt/php-5.4.6/Zend/zend_hash.c:560
#8  0x007b8f19 in _zval_dtor_func (zvalue=0x12adf328, 
__zend_filename=0x97e728 "/opt/php-5.4.6/ext/pcre/php_pcre.c", 
__zend_lineno=550) at /opt/php-5.4.6/Zend/zend_variables.c:43
#9  0x0049daee in _zval_dtor (__zend_lineno=, 
__zend_filename=0x97e728 "/opt/php-5.4.6/ext/pcre/php_pcre.c", 
zvalue=0x12adf328)
at /opt/php-5.4.6/Zend/zend_variables.h:35
#10 php_pcre_match_impl (pce=0x5a32e10, 
subject=0x12adf4f0 "/**\n * Note that there are some values written like 
-2147483647 - 1. This is the lower 32bit int max and is a known\n * behavior of 
PHP.\n */\n/**\n * @dataProvider formatCurrencyWithCurrencyStyleSwis"..., 
subject_len=225, return_value=0x12adf740, subpats=0x12adf328, global=1, 
use_flags=0, flags=0, start_offset=0)
at /opt/php-5.4.6/ext/pcre/php_pcre.c:550
#11 0x0049da3b in php_do_pcre_match (ht=3, return_value=0x12adf740, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, global=1) at 
/opt/php-5.4.6/ext/pcre/php_pcre.c:520
#12 0x0049e850 in zif_preg_match_all (ht=

Bug #63055 [Opn]: Segfault in zend_gc with SF2 testsuite

2012-09-10 Thread php at wallbash dot com
Edit report at https://bugs.php.net/bug.php?id=63055&edit=1

 ID: 63055
 User updated by:    php at wallbash dot com
 Reported by:    php at wallbash dot com
 Summary:Segfault in zend_gc with SF2 testsuite
 Status: Open
 Type:   Bug
 Package:*General Issues
 Operating System:   CentOS 6.3
 PHP Version:5.4.6
 Block user comment: N
 Private report: N

 New Comment:

Like stated on pecl: I sadly can't. Every output i generate or just executing 
that one test case make the segfault go away.

I'm really sorry I can't provide anything more helpful but with issues like 
that (see the last time I ran into something like that: 
https://bugs.php.net/bug.php?id=60825) getting a good repro is really hard for 
me. I've tried for a couple of hours but gave up.

I totally understand if this is not fixable for you of course but asking in 
php.pecl encouraged me to post it anyways :)


Previous Comments:

[2012-09-10 12:53:17] larue...@php.net

I can not reproduce this with 5.4-branch...

could you try to make a small reproduce test script ?  thanks

----
[2012-09-10 12:41:19] php at wallbash dot com

He laruence,

i meant the segfault happens with 5.3.16, 5.4.6 and with master but I only 
included two coredumps.

The included coredump that produced a meaningful stacktrace is from 5.4.6 like 
noted.


[2012-09-10 12:24:42] larue...@php.net

you mean , you are running with 5.3?

----
[2012-09-10 12:19:49] php at wallbash dot com

Initially I ran into this issue with 5.3.16 but I didn't include a coredump for 
it. Just added it to make clear it might not be something new in 5.4

Regards,
Edorian

--------
[2012-09-10 11:56:59] php at wallbash dot com

Description:

Reproduceable with php-master & 5.4.6

I'm sorry for not being able to break that down. Only running the segfaulting 
test works without an issue and even generating more output during the 
execution doesn't lead to the issue :(

The best I can come with is providing all the instructions to run the whole 
thing.

Configure: 

'./configure'  '--prefix=/opt/php-master' '--without-pear' '--with-zlib' 
'--with-xsl' '--enable-debug'

Test script:
---
git clone https://github.com/symfony/symfony.git
git checkout 4dc197c3e1ea227e36cab7ea93877fa44ecc569b
curl -s http://getcomposer.org/installer | php
COMPOSER_ROOT_VERSION=dev-master php composer.phar --dev install
php src/Symfony/Component/Locale/Resources/data/build-data.php
export USE_INTL_ICU_DATA_VERSION=1

pear config-set auto_discover 1
pear install --alldeps pear.phpunit.de/phpunit-3.7.0RC3
pear install --alldeps pear.phpunit.de/php_codecoverage-1.2.0RC3
pear install --alldeps pear.phpunit.de/punit_mockobject-1.2.0RC4

phpunit

Expected result:

No segfault

Actual result:
--
Core with 5.4.6

CORE 5.4.6:
---

gdb /opt/php-5.4.6/bin/php /tmp/cores/core-php.17245 

This GDB was configured as "x86_64-redhat-linux-gnu".

Reading symbols from /opt/php-5.4.6/bin/php...done.
[New LWP 17245]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/opt/php-5.4.6/bin/php /usr/bin/phpunit'.
Program terminated with signal 11, Segmentation fault.
#0  0x007e493f in zval_mark_grey (pz=0x12adf328) at 
/opt/php-5.4.6/Zend/zend_gc.c:425
425 pz = *(zval**)p->pData;
(gdb) bt
#0  0x007e493f in zval_mark_grey (pz=0x12adf328) at 
/opt/php-5.4.6/Zend/zend_gc.c:425
#1  0x007e4c6e in gc_mark_roots () at /opt/php-5.4.6/Zend/zend_gc.c:501
#2  0x007e57cd in gc_collect_cycles () at 
/opt/php-5.4.6/Zend/zend_gc.c:793
#3  0x007e3e96 in gc_zval_possible_root (zv=0x12adf9e8) at 
/opt/php-5.4.6/Zend/zend_gc.c:166
#4  0x007a689e in gc_zval_check_possible_root (z=0x12adf9e8) at 
/opt/php-5.4.6/Zend/zend_gc.h:183
#5  _zval_ptr_dtor (zval_ptr=0x12adff00, __zend_filename=0xca8750 
"/opt/php-5.4.6/Zend/zend_variables.c", __zend_lineno=180) at 
/opt/php-5.4.6/Zend/zend_execute_API.c:448
#6  0x007b9354 in _zval_ptr_dtor_wrapper (zval_ptr=0x12adff00) at 
/opt/php-5.4.6/Zend/zend_variables.c:180
#7  0x007cd5da in zend_hash_destroy (ht=0x12adf6a0) at 
/opt/php-5.4.6/Zend/zend_hash.c:560
#8  0x007b8f19 in _zval_dtor_func (zvalue=0x12adf328, 
__zend_filename=0x97e728 "/opt/php-5.4.6/ext/pcre/php_pcre.c", 
__zend_lineno=550) at /opt/php-5.4.6/Zend/zend_variables.c:43
#9

Bug #63055 [Fbk->Asn]: Segfault in zend_gc with SF2 testsuite

2012-09-11 Thread php at wallbash dot com
Edit report at https://bugs.php.net/bug.php?id=63055&edit=1

 ID: 63055
 User updated by:    php at wallbash dot com
 Reported by:    php at wallbash dot com
 Summary:Segfault in zend_gc with SF2 testsuite
-Status: Feedback
+Status: Assigned
 Type:   Bug
 Package:*General Issues
 Operating System:   CentOS 6.3
 PHP Version:5.4.6
 Assigned To:laruence
 Block user comment: N
 Private report: N

 New Comment:

Fixed reproduce instructions: https://gist.github.com/3690351; Maybe that helps 
you laruence.

I've misspelled the phpunit mock object dependency and it doesn't work with 
newer versions (as it, i assume, involves object cloning that newer versions 
have turned off). Any other minor versions don't lead to the segfault.


@reeze,

(gdb) zbacktrace

(gdb) [0x7ff1428d4ea8] 
preg_match_all("/@requires\s+(?Pfunction|extension)\s(?P([^\40]+))\r?$/m",
 
"/**\12\40*\40Note\40that\40there\40are\40some\40values\40written\40like\40-2147483647\40-\401.\40This\40is\40the\40lower\4032bit\40int\40max\40and\40is\40a\40known\12\40*\40behavior\40of\40PHP.\12\40*/\12/**\12\40\40\40\40\40*\40@dataProvider\40formatCurrencyWithCurrencyStyleBrazilianRealRoundingProvider\12\40\40\40\40\40*/",
 array(7)[0x14916c30]) /usr/share/pear/PHPUnit/Util/Test.php:126 
[0x7ff1428d4ab0] 
getRequirements("Symfony\Component\Locale\Tests\Stub\StubNumberFormatterTest", 
"testFormatCurrencyWithCurrencyStyleBrazilianRealRoundingStub") 
/usr/share/pear/PHPUnit/Framework/TestCase.php:558 
[0x7ff1428d4378] setRequirementsFromAnnotation() 
/usr/share/pear/PHPUnit/Framework/TestCase.php:586 
[0x7ff1428d31b0] checkRequirements() 
/usr/share/pear/PHPUnit/Framework/TestCase.php:823 
[0x7ff1428d1d38] runBare() /usr/share/pear/PHPUnit/Framework/TestResult.php:649 
[0x7ff1428d0dd8] run(object[0x747e368]) 
/usr/share/pear/PHPUnit/Framework/TestCase.php:770 
[0x7ff1428d0cd8] run(object[0xa6fcfe0]) 
/usr/share/pear/PHPUnit/Framework/TestSuite.php:776 
[0x7ff1428cf980] runTest(object[0x747e368], object[0xa6fcfe0]) 
/usr/share/pear/PHPUnit/Framework/TestSuite.php:746 
[0x7ff1428ce610] run(object[0xa6fcfe0], false, array(0)[0xa6fa9e8], 
array(1)[0xa7390a8], false) /usr/share/pear/PHPUnit/Framework/TestSuite.php:706 
[0x7ff1428cd2a0] run(object[0xa6fcfe0], false, array(0)[0x14735b38], 
array(1)[0x14735cf0], false) 
/usr/share/pear/PHPUnit/Framework/TestSuite.php:706 
[0x7ff1428caea0] run(object[0xa6fcfe0], false, array(0)[0xab473f0], 
array(1)[0xab475a8], false) /usr/share/pear/PHPUnit/TextUI/TestRunner.php:325 
[0x7ff1428ca528] doRun(object[0x7ff13c2c3ed8], array(5)[0xab48718]) 
/usr/share/pear/PHPUnit/TextUI/Command.php:177 
[0x7ff1428ca360] run(array(1)[0x6b7c498], true) 
/usr/share/pear/PHPUnit/TextUI/Command.php:130 
[0x7ff1428ca0e8] main() /usr/bin/phpunit:46 
(gdb) 

Hope that helps :)


Previous Comments:

[2012-09-11 08:48:58] larue...@php.net

intl

Internationalization support => enabled
version => 1.1.0
ICU version => 3.6


[2012-09-11 06:57:39] reeze dot xia at gmail dot com

gdb > zbactrace   --->  gdb > zbacktrace   missing a 'k' :)


[2012-09-11 06:56:49] reeze dot xia at gmail dot com

Hi wallbash,
  when you got a backtrace, you could source php-src's backtrace of php script

gdb > source path/to/php-src/.gdbinit
gdb > zbactrace 
then you may see a php level script, then we could find where cause the php 
crash


[2012-09-11 06:53:26] reeze dot xia at gmail dot com

>From the backtrace this seems a test for ext: intl, 
I can't install intl ext in my box because of compile issue.

@larucene, do you see some test skip for intl or did you enabled intl extsion?

--------
[2012-09-10 16:34:15] php at wallbash dot com

Like stated on pecl: I sadly can't. Every output i generate or just executing 
that one test case make the segfault go away.

I'm really sorry I can't provide anything more helpful but with issues like 
that (see the last time I ran into something like that: 
https://bugs.php.net/bug.php?id=60825) getting a good repro is really hard for 
me. I've tried for a couple of hours but gave up.

I totally understand if this is not fixable for you of course but asking in 
php.pecl encouraged me to post it anyways :)




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

https://bugs.php.net/bug.php?id=63055


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=63055&edit=1


#45409 [Com]: strtotime() very slow when operating on timestamp

2009-02-04 Thread php at wallbash dot com
 ID:   45409
 Comment by:   php at wallbash dot com
 Reported By:  jerico dot dev at gmail dot com
 Status:   Assigned
 Bug Type: Date/time related
 Operating System: *
 PHP Version:  5.*CVS, 6CVS (2008-12-09)
 Assigned To:  derick
 New Comment:

Hi,

i hope i don't bug you but do you know when this might get fixed or is
there a patch available ? We (finally) moved to 5.2 and this is a
showstopper for us and would (sadly) require lots of refactoring.

Thanks


Previous Comments:


[2008-07-01 21:30:28] der...@php.net

I'll have a look at this, but there is even a MUCH faster way:

modify( '+1 year' );
$mt1 = microtime(true);
$d->modify( '+1 year' );
$mt2 = microtime(true);
printf("%.6f\r\n%.6f\r\n", $mt1-$mt0, $mt2-$mt1);
?>
0.013312/0.696215 for your code, vs 0.65/0.28 for my approach.



[2008-07-01 20:55:08] jerico dot dev at gmail dot com

Description:

strtotime() performs 3 orders of magnitude slower when operating on a
timestamp.

Reproduce code:
---
$string = '1902-03-25 18:25:25';
$timestamp = strtotime($string); 

$mt0 = microtime(true);
$result1 = strtotime("$string +1 year");
$mt1 = microtime(true);
$result2 = strtotime("+1 year", $timestamp);
$mt2 = microtime(true);
printf("%.6f\r\n%.6f\r\n", $mt1-$mt0, $mt2-$mt1);

// This will output
// 0.000171
// 0.721877
// on my machine

Actual result:
--
see reproduce code





-- 
Edit this bug report at http://bugs.php.net/?id=45409&edit=1