# PHP dumps core loading extension - more information

- Thread: https://externals.io/message/3606
- Original archive: https://news-web.php.net/php.internals/3606
- Started by Bruce Bailey on 2003-07-25T22:32:51+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #3606 — Bruce Bailey — 2003-07-25T22:32:51+00:00

URL: https://externals.io/message/3606#3606

A new discovery . . .

I created a new extension with only one function and it calls a dso library 
that also has only one function.  So the libraries are:

php --> my new extension --> my new utility library.

the new utility library has only this function:

int function1(void){return 456;}

When I compile and link the library with C, I can run 'phpinfo();' with no 
problems.  When I use C++ to compile and link, running 'phpinfo();' core 
dumps.  Gdb reports the same backtrace as listed below.  This can't be 
right.  Outside of the php context, C and C++ co-exist perfectly.

Are there some php-related configuration options that might have bearing on 
this?  What am I missing?

This doesn't make any sense.

Bruce



>I should have thought of including a backtrace before:
>
>(gdb) bt
>#0  0x0000030002891c30 in ?? ()
>#1  0x000003ff800dd7d0 in exit () from /usr/shlib/libc.so
>#2  0x000003ff800dd7d0 in exit () from /usr/shlib/libc.so
>Cannot access memory at address 0x20
>(gdb)
>
>
>
> > […]
>exercise
> > […]
>reason,
> > […]
>functions.
> > […]
>PHP_MINIT_FUNCTION(myext)
> > […]

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail
