Bug #71712 [Com]: Segmentation fault on ReflectionClass::newInstanceArgs
| From: | bashofmann at gmail dot com | Date: | Fri, 04 Mar 2016 17:56:51 +0000 |
| Subject: | Bug #71712 [Com]: Segmentation fault on ReflectionClass::newInstanceArgs | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-199600@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71712&edit=1
ID: 71712
Comment by: bashofmann at gmail dot com
Reported by: bashofmann at gmail dot com
Summary: Segmentation fault on
ReflectionClass::newInstanceArgs
Status: Open
Type: Bug
Package: Reproducible crash
Operating System: Ubuntu 14.04
PHP Version: 7.0.4
Block user comment: N
Private report: N
New Comment:
Now I get:
$ USE_ZEND_ALLOC=0 valgrind --trace-children=yes bin/phpunit
test/unit/modules/literature/classes/ClaimingServiceTest.php
==11730== Memcheck, a memory error detector
==11730== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==11730== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==11730== Command: bin/phpunit test/unit/modules/literature/classes/ClaimingServiceTest.php
==11730==
==11730== Memcheck, a memory error detector
==11730== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==11730== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==11730== Command: /usr/bin/php bin/phpunit
test/unit/modules/literature/classes/ClaimingServiceTest.php
==11730==
==11738== Memcheck, a memory error detector
==11738== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==11738== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==11738== Command: /bin/sh -c stty\ size
==11738==
==11739== Memcheck, a memory error detector
==11739== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==11739== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==11739== Command: /bin/stty size
==11739==
==11739==
==11739== HEAP SUMMARY:
==11739== in use at exit: 0 bytes in 0 blocks
==11739== total heap usage: 147 allocs, 147 frees, 15,846 bytes allocated
==11739==
==11739== All heap blocks were freed -- no leaks are possible
==11739==
==11739== For counts of detected and suppressed errors, rerun with: -v
==11739== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==11738==
==11738== HEAP SUMMARY:
==11738== in use at exit: 1,352 bytes in 38 blocks
==11738== total heap usage: 40 allocs, 2 frees, 1,456 bytes allocated
==11738==
==11738== LEAK SUMMARY:
==11738== definitely lost: 0 bytes in 0 blocks
==11738== indirectly lost: 0 bytes in 0 blocks
==11738== possibly lost: 0 bytes in 0 blocks
==11738== still reachable: 1,352 bytes in 38 blocks
==11738== suppressed: 0 bytes in 0 blocks
==11738== Rerun with --leak-check=full to see details of leaked memory
==11738==
==11738== For counts of detected and suppressed errors, rerun with: -v
==11738== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
PHPUnit 5.2.9 by Sebastian Bergmann and contributors.
Runtime: PHP 7.0.4-1+deb.sury.org~trusty+1
Configuration: /home/researchgate/rg_dev/community/phpunit.xml
==11730== Invalid free() / delete / delete[] / realloc()
==11730== at 0x4C2BDEC: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11730== by 0x1647A1A4: ??? (in /usr/lib/php/20151012/memcached.so)
==11730== by 0x1647F51C: ??? (in /usr/lib/php/20151012/memcached.so)
==11730== by 0x3CFA93: ??? (in /usr/bin/php7.0)
==11730== by 0x3920CA: execute_ex (in /usr/bin/php7.0)
==11730== by 0x347158: dtrace_execute_ex (in /usr/bin/php7.0)
==11730== by 0x3CF75F: ??? (in /usr/bin/php7.0)
==11730== by 0x3920CA: execute_ex (in /usr/bin/php7.0)
==11730== by 0x347158: dtrace_execute_ex (in /usr/bin/php7.0)
==11730== by 0x3CF75F: ??? (in /usr/bin/php7.0)
==11730== by 0x3920CA: execute_ex (in /usr/bin/php7.0)
==11730== by 0x347158: dtrace_execute_ex (in /usr/bin/php7.0)
==11730== Address 0x23a74070 is 0 bytes inside a block of size 8 free'd
==11730== at 0x4C2BDEC: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11730== by 0x1647A12D: ??? (in /usr/lib/php/20151012/memcached.so)
==11730== by 0x1647F4DA: ??? (in /usr/lib/php/20151012/memcached.so)
==11730== by 0x3CFA93: ??? (in /usr/bin/php7.0)
==11730== by 0x3920CA: execute_ex (in /usr/bin/php7.0)
==11730== by 0x347158: dtrace_execute_ex (in /usr/bin/php7.0)
==11730== by 0x3CF75F: ??? (in /usr/bin/php7.0)
==11730== by 0x3920CA: execute_ex (in /usr/bin/php7.0)
==11730== by 0x347158: dtrace_execute_ex (in /usr/bin/php7.0)
==11730== by 0x3CF75F: ??? (in /usr/bin/php7.0)
==11730== by 0x3920CA: execute_ex (in /usr/bin/php7.0)
==11730== by 0x347158: dtrace_execute_ex (in /usr/bin/php7.0)
==11730==
==11730== Invalid free() / delete / delete[] / realloc()
==11730== at 0x4C2BDEC: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11730== by 0x1647A1AD: ??? (in /usr/lib/php/20151012/memcached.so)
==11730== by 0x1647F51C: ??? (in /usr/lib/php/20151012/memcached.so)
==11730== by 0x3CFA93: ??? (in /usr/bin/php7.0)
==11730== by 0x3920CA: execute_ex (in /usr/bin/php7.0)
==11730== by 0x347158: dtrace_execute_ex (in /usr/bin/php7.0)
==11730== by 0x3CF75F: ??? (in /usr/bin/php7.0)
==11730== by 0x3920CA: execute_ex (in /usr/bin/php7.0)
==11730== by 0x347158: dtrace_execute_ex (in /usr/bin/php7.0)
==11730== by 0x3CF75F: ??? (in /usr/bin/php7.0)
==11730== by 0x3920CA: execute_ex (in /usr/bin/php7.0)
==11730== by 0x347158: dtrace_execute_ex (in /usr/bin/php7.0)
==11730== Address 0x20a7a4f0 is 0 bytes inside a block of size 8 free'd
==11730== at 0x4C2BDEC: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11730== by 0x1647A11B: ??? (in /usr/lib/php/20151012/memcached.so)
==11730== by 0x1647F4DA: ??? (in /usr/lib/php/20151012/memcached.so)
==11730== by 0x3CFA93: ??? (in /usr/bin/php7.0)
==11730== by 0x3920CA: execute_ex (in /usr/bin/php7.0)
==11730== by 0x347158: dtrace_execute_ex (in /usr/bin/php7.0)
==11730== by 0x3CF75F: ??? (in /usr/bin/php7.0)
==11730== by 0x3920CA: execute_ex (in /usr/bin/php7.0)
==11730== by 0x347158: dtrace_execute_ex (in /usr/bin/php7.0)
==11730== by 0x3CF75F: ??? (in /usr/bin/php7.0)
==11730== by 0x3920CA: execute_ex (in /usr/bin/php7.0)
==11730== by 0x347158: dtrace_execute_ex (in /usr/bin/php7.0)
==11730==
==11730== Invalid free() / delete / delete[] / realloc()
==11730== at 0x4C2BDEC: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11730== by 0x1647F51C: ??? (in /usr/lib/php/20151012/memcached.so)
==11730== by 0x3CFA93: ??? (in /usr/bin/php7.0)
==11730== by 0x3920CA: execute_ex (in /usr/bin/php7.0)
==11730== by 0x347158: dtrace_execute_ex (in /usr/bin/php7.0)
==11730== by 0x3CF75F: ??? (in /usr/bin/php7.0)
==11730== by 0x3920CA: execute_ex (in /usr/bin/php7.0)
==11730== by 0x347158: dtrace_execute_ex (in /usr/bin/php7.0)
==11730== by 0x3CF75F: ??? (in /usr/bin/php7.0)
==11730== by 0x3920CA: execute_ex (in /usr/bin/php7.0)
==11730== by 0x347158: dtrace_execute_ex (in /usr/bin/php7.0)
==11730== by 0x3CF75F: ??? (in /usr/bin/php7.0)
==11730== Address 0x1f102ac0 is 0 bytes inside a block of size 8 free'd
==11730== at 0x4C2BDEC: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11730== by 0x1647A124: ??? (in /usr/lib/php/20151012/memcached.so)
==11730== by 0x1647F4DA: ??? (in /usr/lib/php/20151012/memcached.so)
==11730== by 0x3CFA93: ??? (in /usr/bin/php7.0)
==11730== by 0x3920CA: execute_ex (in /usr/bin/php7.0)
==11730== by 0x347158: dtrace_execute_ex (in /usr/bin/php7.0)
==11730== by 0x3CF75F: ??? (in /usr/bin/php7.0)
==11730== by 0x3920CA: execute_ex (in /usr/bin/php7.0)
==11730== by 0x347158: dtrace_execute_ex (in /usr/bin/php7.0)
==11730== by 0x3CF75F: ??? (in /usr/bin/php7.0)
==11730== by 0x3920CA: execute_ex (in /usr/bin/php7.0)
==11730== by 0x347158: dtrace_execute_ex (in /usr/bin/php7.0)
==11730==
. 1 / 1 (100%)
Time: 19.21 seconds, Memory: 0.00Mb
OK (1 test, 1 assertion)
==11730==
==11730== HEAP SUMMARY:
==11730== in use at exit: 863,801 bytes in 5,088 blocks
==11730== total heap usage: 1,497,514 allocs, 1,492,429 frees, 2,752,640,474 bytes allocated
==11730==
==11730== LEAK SUMMARY:
==11730== definitely lost: 7,501 bytes in 51 blocks
==11730== indirectly lost: 624,079 bytes in 2,886 blocks
==11730== possibly lost: 212,626 bytes in 2,074 blocks
==11730== still reachable: 19,595 bytes in 77 blocks
==11730== suppressed: 0 bytes in 0 blocks
==11730== Rerun with --leak-check=full to see details of leaked memory
==11730==
==11730== For counts of detected and suppressed errors, rerun with: -v
==11730== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
Previous Comments:
------------------------------------------------------------------------
[2016-03-04 17:43:22] nikic@php.net
Ah, likely you need to add --trace-children=yes to the valgrind invocation (bin/phpunit is probably
a shell script or something).
------------------------------------------------------------------------
[2016-03-04 17:28:17] bashofmann at gmail dot com
Looks the same:
$ USE_ZEND_ALLOC=0 valgrind bin/phpunit test/unit/modules/literature/classes/ClaimingServiceTest.php
==10358== Memcheck, a memory error detector
==10358== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==10358== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==10358== Command: bin/phpunit test/unit/modules/literature/classes/ClaimingServiceTest.php
==10358==
PHPUnit 5.2.9 by Sebastian Bergmann and contributors.
Runtime: PHP 7.0.4-1+deb.sury.org~trusty+1 with Xdebug 2.4.0RC4
Configuration: /home/researchgate/rg_dev/community/phpunit.xml
*** Error in `php': double free or corruption (fasttop): 0x00007f0d68b4a310 ***
Aborted (core dumped)
------------------------------------------------------------------------
[2016-03-04 17:25:14] nikic@php.net
I mean this:
USE_ZEND_ALLOC=0 valgrind bin/phpunit
test/unit/modules/literature/classes/ClaimingServiceTest.php
------------------------------------------------------------------------
[2016-03-04 17:13:37] bashofmann at gmail dot com
You mean like this:
USE_ZEND_ALLOC=0 bin/phpunit test/unit/modules/literature/classes/ClaimingServiceTest.php
PHPUnit 5.2.9 by Sebastian Bergmann and contributors.
Runtime: PHP 7.0.4-1+deb.sury.org~trusty+1 with Xdebug 2.4.0RC4
Configuration: /home/researchgate/rg_dev/community/phpunit.xml
*** Error in `php': double free or corruption (fasttop): 0x00007fdbd720c5a0 ***
Aborted (core dumped)
------------------------------------------------------------------------
[2016-03-04 13:05:34] nikic@php.net
Can you check whether running the unit test through USE_ZEND_ALLOC=0 valgrind results in any errors?
------------------------------------------------------------------------
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=71712
--
Edit this bug report at https://bugs.php.net/bug.php?id=71712&edit=1