Bug #14045 Updated: PHP Segfaults -- custom extension using resources
| From: | sniper@php.net | Date: | Wed, 14 Nov 2001 00:55:35 +0000 |
| Subject: | Bug #14045 Updated: PHP Segfaults -- custom extension using resources | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-70389@lists.php.net to get a copy of this message | ||
ID: 14045
Updated by: sniper
Reported By: eterstegen@kingscredit.com
Old Status: Open
Status: Bogus
Bug Type: Reproducible crash
Operating System: RedHat Linux 7.1
PHP Version: 4.0.6
New Comment:
Please ask this kind of questions on the
php-dev@lists.php.net mailing list.
--Jani
Previous Comments:
------------------------------------------------------------------------
[2001-11-13 17:48:28] eterstegen@kingscredit.com
I am working on a PHP extension which will basically be a
wrapper for a library dealing with DECnet..
PHP is compiled as a module for Apache 1.3.20 with apxs
and no real special arguments. Also I am compiling the
extension by hand as illustrated in the Zend API docs.
I have debugged the problem down to a point where it seems
to be a complex reaction between 2 libraries and resources
which causes PHP to segfault.
The php extension links to 2 shared libraries (both are
C++). The main library contains a function (called from
the extension) which creates a new instance of a class,
and then returns this newly created class to the PHP
extension as a (typdef void *), since the extension is
straight C. The class used in the main library is defined
in the second library.
After adding some code to implement resources (a basic
MINIT, destructor, and handle) the extension segfaults
every time.
Unfotunately I am having a hard time pasting the backtrace
here but the first 5 lines are ?? and the 6th line has
0x08051461 in run_cleanups () at eval.c:41
I have very stripped down code for both libraries and the
module, but cannot paste them here.. I can zip them up and
send them if need be.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14045&edit=1