Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
July 1, 2005, 12:52 am
rate this thread
I am using PHP 4.3.11 on Fedora Core 4, which has gcc 4 instead of gcc
Fedora Core 4 normally comes with PHP 5, but I removed it and installed
PHP 4.3.11 from source, so that I didn't have to figure out problems I
had with my extension and php 5.
After a number of calls to my extension, there is one call to function
(which has been called before) in which the code exits my function, and
then crashes inside PHP shortly thereafter. The seg fault is in
php-4.3.11/Zend/zend_execute.c on line 1658, which reads:
EG(current_execute_data) = &execute_data;
The extension function it is returning from returns a long, not some
fancy php object or reference.
I don't know if anyone on this forum will have any ideas, but if you
have any thoughts at all please offer them.
I am thinking that this might be a result of php being compiled with
gcc4, and the new gcc 4 does something different and exposes some bug
in PHP ? Has anyone seen problems running PHP 4 compiled with gcc 4 ?
Any thoughts at all are appreciated.
Re: Crash in PHP 4.3.11 after an extension function ( gcc 4 on Fedora Core 4)
Following up on my own post in case anyone has the same problem and
finds this with google:
The problem turned out to me in MY code in the extension, not in PHP;
it was that I declared the return value to be passed back to PHP as an
int, not a long, and those two types have different sizes on 64bit
linux. I am not sure why I never had a problem with this until Fedora
Core 4, because it worked inspite of that mistake on older 64bit