> I think the problem here is that you need to pass a NULL into dlopen
> for the filename to get the main image, not a null string.

[snip]

>     null $S0
>     loadlib self_lib, $S0

that's exactly what i was doing -- i should have included more of the
actual code in my original mail (i admit, nullstring is confusing):

   .local string nullstring
   .local pmc func
   .local pmc self_lib

   null nullstring
   loadlib self_lib, nullstring
   dlfunc func, self_lib, "ap_rputs", "itp"   <== segfaults here
   store_global "ap_rputs", func
   ...

if that looks right to you, i can probably convince apache to core dump
and send a backtrace.

-jeff

On Thu, 9 Sep 2004, Dan Sugalski wrote:

> At 11:02 AM -0400 9/9/04, Jeff Horwitz wrote:
> >okay, i'm bringing back a thread from a year ago.  for mod_parrot, i'd
> >like to be able to loadlib the running process image (httpd) and dlfunc
> >the various apache API functions.  however, while this works for libc
> >functions, and any other functions from shared libraries, it appears not
> >to work for those statically linked into the binary.  in fact,
> >
> >loadlib self_lib, nullstring
> >dlfunc func, self_lib, "ap_rputs", "ptv"
> >
> >will reliably segfault on my box (RHEL 3.0)
>
>
> If this doesn't work then we'll track things down more to see why.
> --
>                               Dan
>
> --------------------------------------it's like this-------------------
> Dan Sugalski                          even samurai
> [EMAIL PROTECTED]                         have teddy bears and even
>                                        teddy bears get drunk
>

Reply via email to