Skip to content

fix segfault in wr_store_tracked_object_dtor #22

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

Closed
wants to merge 5 commits into from

Conversation

remicollet
Copy link
Contributor

With this fix, build and test suite OK (except weakref_007.phpt which seems outdated, see 3rd commit)

I think it make sense, when no more track, to restore the old dtor (which was altered on first track), thus wr_store_tracked_object_dtor is no more called.

But perhaps I have not enough knowledge of this extension internals ;)

@remicollet
Copy link
Contributor Author

In fact, another try,, without restoring the dtor.

@remicollet
Copy link
Contributor Author

Tested on Fedora 20 to 23, RHEL 6 to 7, i386 and x86_64, NTS and ZTS.
gcc 4.4.7, 4.8.5, 4.8.3, 4.9.2, 5.3.1

 =====================================================================
 PHP         : /opt/remi/php70/root/usr/bin/php 
 PHP_SAPI    : cli
 PHP_VERSION : 7.0.2
 ZEND_VERSION: 3.0.0
 PHP_OS      : Linux - Linux builder.remirepo.net 4.2.8-300.fc23.x86_64 #1 SMP Tue Dec 15 16:49:06 UTC 2015 x86_64
 INI actual  : /work/GIT/php-weakref/tmp-php.ini
 More .INIs  :   
 CWD         : /work/GIT/php-weakref
 Extra dirs  : 
 VALGRIND    : Not used
 =====================================================================
 TIME START 2016-01-13 08:07:31
 =====================================================================
 PASS WeakMap: usage [tests/weakmap_001.phpt] 
 PASS WeakMap: unsetting [tests/weakmap_002.phpt] 
 PASS WeakMap: test detach on unset [tests/weakmap_003.phpt] 
 PASS WeakMap: test detach on unset [tests/weakmap_004.phpt] 
 PASS WeakMap: cloning [tests/weakmap_005.phpt] 
 PASS Weakref: usage [tests/weakref_001.phpt] 
 PASS Weakref: acquire/release usage [tests/weakref_002.phpt] 
 PASS Weakref: usage [tests/weakref_003.phpt] 
 PASS Weakref: cloning acquired weakref [tests/weakref_004.phpt] 
 PASS Weakref: cloning acquired weakref [tests/weakref_005.phpt] 
 PASS Weakref: Destroying the weakref within the std dtor of the object [tests/weakref_006.phpt] 
 PASS Weakref: Destroying the weakref and its object after a fatal error [tests/weakref_007.phpt] 
 PASS Weakref: zval splitting causes crash [tests/weakref_008.phpt] 
 PASS Weakref: zval splitting causes crash [tests/weakref_009.phpt] 
 PASS Weakref: Crash [tests/weakref_010.phpt] 
 PASS Weakref: cloning [tests/weakref_011.phpt] 
 PASS Weakref: cloning with acquire [tests/weakref_012.phpt] 
 PASS Weakref: usage [tests/weakref_013.phpt] 
 =====================================================================
 TIME END 2016-01-13 08:07:31

 =====================================================================
 TEST RESULT SUMMARY
 ---------------------------------------------------------------------
 Exts skipped    :    0
 Exts tested     :   15
 ---------------------------------------------------------------------

 Number of tests :   18                18
 Tests skipped   :    0 (  0.0%) --------
 Tests warned    :    0 (  0.0%) (  0.0%)
 Tests failed    :    0 (  0.0%) (  0.0%)
 Expected fail   :    0 (  0.0%) (  0.0%)
 Tests passed    :   18 (100.0%) (100.0%)
 ---------------------------------------------------------------------
 Time taken      :    0 seconds
 =====================================================================

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

Successfully merging this pull request may close these issues.

1 participant