Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Segfault on PHPCR API test. #50

Closed
piotras opened this Issue · 6 comments

2 participants

piotras Henri Bergius
piotras
Collaborator

Segfault when running PHPCR API test: https://github.com/phpcr/phpcr-api-tests/blob/master/tests/10_Writing/SetPropertyDynamicRebindingTest.php

Ini settings:
midgard.memory_debug = On
midgard.valgrind_friendly = On

Valgrind command:
G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind -v php /usr/bin/phpunit suite/tests/10_Writing/SetPropertyDynamicRebindingTest.php

==26619== Process terminating with default action of signal 11 (SIGSEGV)
==26619== Access not within mapped region at address 0x6EF3A066
==26619== at 0x832EF6A: ??? (in /usr/bin/php5)
==26619== by 0x832EF39: ??? (in /usr/bin/php5)
==26619== by 0x832EF39: ??? (in /usr/bin/php5)
==26619== by 0x832EF39: ??? (in /usr/bin/php5)
==26619== by 0x832EF39: ??? (in /usr/bin/php5)
==26619== by 0x832EF39: ??? (in /usr/bin/php5)
==26619== by 0x832EF39: ??? (in /usr/bin/php5)
==26619== by 0x832EF39: ??? (in /usr/bin/php5)
==26619== by 0x832EF39: ??? (in /usr/bin/php5)
==26619== by 0x832EF39: ??? (in /usr/bin/php5)
==26619== by 0x832EF39: ??? (in /usr/bin/php5)
==26619== by 0x832EF39: ??? (in /usr/bin/php5)
==26619== If you believe this happened as a result of a stack

==15564== Process terminating with default action of signal 11 (SIGSEGV)
==15564== Access not within mapped region at address 0x5C0B2CA3
==15564== at 0x83019AC: _zval_ptr_dtor (in /usr/bin/php5)
==15564== by 0x831DEBE: _zend_hash_add_or_update (in /usr/bin/php5)
==15564== by 0x51CFF96: php_midgard_zendobject_get_properties (php_midgard_gobject_generic.c:648)
==15564== by 0x832F2E3: ??? (in /usr/bin/php5)
==15564== by 0x832F311: ??? (in /usr/bin/php5)
==15564== by 0x832F311: ??? (in /usr/bin/php5)
==15564== by 0x832F311: ??? (in /usr/bin/php5)
==15564== by 0x832F311: ??? (in /usr/bin/php5)
==15564== by 0x832F72B: gc_collect_cycles (in /usr/bin/php5)
==15564== by 0x832FBBB: gc_zobj_possible_root (in /usr/bin/php5)
==15564== by 0x832FCA3: gc_zval_possible_root (in /usr/bin/php5)
==15564== by 0x8301A18: _zval_ptr_dtor (in /usr/bin/php5)

Henri Bergius
Owner

I'm seeing this as well, another backtrace: http://friendpaste.com/7gEu3sIEwJeE0YcDGyMzKe

In my case it is the Writing\\SetPropertyMethodsTest that crashes. All SetPropertyDynamicRebindingTest passed without problems (well, with some failures)

Henri Bergius
Owner

Another backtrace on the same issue, this time with Writing\AddMethodsTest: http://friendpaste.com/8UaYMJIo7XZxHb6IsTpFs

piotras
Collaborator

New backtrace:

==14546== Process terminating with default action of signal 11 (SIGSEGV)
==14546== Access not within mapped region at address 0x76036012
==14546== at 0x832F20A: ??? (in /usr/bin/php5)
==14546== by 0x832F1F9: ??? (in /usr/bin/php5)
==14546== by 0x832F1F9: ??? (in /usr/bin/php5)
==14546== by 0x832F940: gc_collect_cycles (in /usr/bin/php5)
==14546== by 0x832FE7B: gc_zobj_possible_root (in /usr/bin/php5)
==14546== by 0x832FF63: gc_zval_possible_root (in /usr/bin/php5)
==14546== by 0x8301CD8: _zval_ptr_dtor (in /usr/bin/php5)
==14546== by 0x8303E28: zend_call_function (in /usr/bin/php5)
==14546== by 0x8328841: zend_call_method (in /usr/bin/php5)
==14546== by 0x5450E64: php_midgard_gobject_new_with_gobject (php_midgard_gobject_generic.c:826)
==14546== by 0x5458899: zif__midgard_php_object_list_children (php_midgard_object.c:415)
==14546== by 0x83ABC81: execute_internal (in /usr/bin/php5)

piotras
Collaborator

Looks like common pattern is constructor:

zend_call_method_with_1_params(&mdate_object, php_midgard_datetime_class, &php_midgard_datetime_class->constructor, "__construct", NULL, date);

zend_call_method_with_0_params(&zvalue, ce, &ce->constructor, "__construct", NULL);

piotras
Collaborator
Henri Bergius
Owner

Ok, that seems to help: bergie/phpcr-midgard2@01a6bc9

Henri Bergius bergie closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.