I've been working with Edin to try and track down what caused the
sudden round of crashes in the COM extension in the latest 4.3
release, and it seems that the PZVAL_UNLOCK that Stas introduced in
this commit:
fix overloaded calls not returning result, e.g.:
<? new Java('foo'); ?>
is to blame.
If you counter-act the unlock in the COM call handler (setting is_ref
and bumping the refcount), things work "fine". This is a hack, so I'm
hoping that you engine gurus will divine the correct fix.
A repro script is something like:
$word = new COM('Word.Application');
$word->Documents->Open('somedoc.doc');
It's impossible for me to debug right now, as most of my boxen are
still shipping from the UK, so I have no 4.3 build env on windows.
--Wez.
$word = new COM('Word.Application');
$word->Documents->Open('somedoc.doc');
Just to clarify. The first method invocation will work. During that call
$word object gets destroyed. If we were to add another method invocation
($word->Quit() for example) php would crash.
Edin
Did you look into my latest patch and try with it?
WF>>I've been working with Edin to try and track down what caused the
WF>>sudden round of crashes in the COM extension in the latest 4.3
WF>>release, and it seems that the PZVAL_UNLOCK that Stas introduced in
WF>>this commit:
WF>>
WF>>http://viewcvs.php.net/viewcvs.cgi/Zend/Attic/zend_execute.c.diff?r1=1.316.2.41&r2=1.316.2.42&hideattic=0
WF>>
WF>>fix overloaded calls not returning result, e.g.:
WF>><? new Java('foo'); ?>
WF>>
WF>>is to blame.
WF>>
WF>>If you counter-act the unlock in the COM call handler (setting is_ref
WF>>and bumping the refcount), things work "fine". This is a hack, so I'm
WF>>hoping that you engine gurus will divine the correct fix.
I think the is_ref thing is the key, see above. I'll check with your
example on Sunday.
--
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115
This bug is critical for 4.3.11, and has repercussions for any
extension with overloaded objects, not just COM.
--Wez.
On Sat, 25 Dec 2004 15:48:26 +0200 (IST), Stanislav Malyshev
stas@zend.com wrote:
Did you look into my latest patch and try with it?
The tip of the 4.3 branch is still broken; and I don't see any changes
in CVS either before or after the commit I mentioned--did you forget
to commit something?
WF>>
WF>>fix overloaded calls not returning result, e.g.:
WF>><? new Java('foo'); ?>
WF>>
WF>>is to blame.
WF>>
WF>>If you counter-act the unlock in the COM call handler (setting is_ref
WF>>and bumping the refcount), things work "fine". This is a hack, so I'm
WF>>hoping that you engine gurus will divine the correct fix.I think the is_ref thing is the key, see above. I'll check with your
example on Sunday.