php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14045 PHP Segfaults -- custom extension using resources
Submitted: 2001-11-13 17:48 UTC Modified: 2001-11-13 19:55 UTC
From: eterstegen at kingscredit dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 4.0.6 OS: RedHat Linux 7.1
Private report: No CVE-ID: None
 [2001-11-13 17:48 UTC] eterstegen at kingscredit dot 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.

 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-13 19:55 UTC] sniper@php.net
Please ask this kind of questions on the 
php-dev@lists.php.net mailing list.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 16:01:29 2024 UTC