|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-04-03 11:42 UTC] black at sunshine dot krneki dot org
On bugreport 21478 i've experienced the same problem and behaviour when trying to debug, but i believe the bugs are generally unrelated. I've been searching to the sollution for my segfaulting of apache in various areas... output buffering, stream functions (file access, file_get_contents), references... and since i got the crashes in 4.3 then i thought of the only thing i added to the code which was 4.3 related, and that was the use of aggregate.. i used aggregate to aggregate 3-4 classes to a main object, and after removing and reforming the classes to preform a row of "extends" on them.. the behaviour wen't away, and I didnt get a single segfault in the last 3-4 days. it is my opinion that aggregate either contains a memory leak somewhere, or that the problem is located inside the scripting engine.. i dont have anything to reproduce it anymore, except old cvs snapshots which could reproduce it if required, but removing aggregate and with it the segfaults seems to be enough of an indication for me. this seems to be related to 4.3.0 and later, and was reproduced on my side on every php version up to 4.5-CVS PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 09:00:02 2025 UTC |
This short script can reproduce the aggregation bug I reported above. class bar { function doit() { print " Doing...\n"; } } class foo { function foo() { print_r(aggregation_info($this)); aggregate($this, "bar"); } function spawn() { return new foo(); } } $a = new foo(); $a->doit(); $b = $a->spawn(); $b->doit(); unset($a); $c = $b->spawn(); $c->doit(); Besides 'unset($a)', '$a = new foo()' will also cause the same problem.The bug is not fixed. Run the following script either before or after applying andrei's recent patch, one will reproduct the bug. <?php class bar { function doit() { print "Doing bar as " . get_class($this) . " ...\n"; } } class foo { function foo() { print_r(aggregation_info($this)); aggregate($this, "bar"); } } class foobar extends foo { } $a = new foo(); $a->doit(); unset($a); $b = new foobar(); $b->doit(); ?>