i put my old code back in and got apache to segfault. here's a backtrace, which confirms the offending code, but it doesn't offer much explanation. btw, i'm working off a CVS update from last night.
#0 0xb713b11a in Parrot_dlfunc_p_p_sc_sc (cur_opcode=0xb52a80d0, interpreter=0x815fc50) at core.ops:1110 #1 0xb71a9025 in runops_slow_core (interpreter=0x815fc50, pc=0xb52a80d0) at src/runops_cores.c:147 #2 0xb71a6a52 in runops_int (interpreter=0x815fc50, offset=0) at src/interpreter.c:809 #3 0xb71a7854 in runops (interpreter=0x815fc50, offset=0) at src/inter_run.c:69 #4 0xb71a792f in Parrot_runops_fromc (interpreter=0x815fc50, sub=0x82dd8f8) at src/inter_run.c:140 #5 0xb71354ad in Parrot_call (interpreter=0x815fc50, sub=0x82dd8f8, argcount=0) at src/extend.c:675 #6 0xb70e700c in modparrot_call_sub (interp=0x815fc50, name=0xb72670e0 "_sub2") at parrot.c:45 #7 0xb70e70b1 in modparrot_handler (r=0x815bc90) at mod_parrot.c:60 #8 0x0807c982 in ap_run_handler (r=0x815bc90) at config.c:152 #9 0x0807ce9a in ap_invoke_handler (r=0x815bc90) at config.c:358 #10 0x0806c727 in ap_process_request (r=0x815bc90) at http_request.c:246 #11 0x08068811 in ap_process_http_connection (c=0x8157ba0) at http_core.c:250 #12 0x08085aea in ap_run_process_connection (c=0x8157ba0) at connection.c:42 #13 0x0807b507 in child_main (child_num_arg=0) at prefork.c:609 #14 0x0807b6b2 in make_child (s=0x80b67d8, slot=0) at prefork.c:649 #15 0x0807b70b in startup_children (number_to_start=5) at prefork.c:721 #16 0x0807be0d in ap_mpm_run (_pconf=0x80b40a8, plog=0x80ec188, s=0x80b67d8) at prefork.c:940 #17 0x08080da2 in main (argc=4, argv=0xbfffae94) at main.c:617 i also dumped some of the library PMC, just in case you can see something. (gdb) p interpreter->pmc_reg.registers[cur_opcode[2]]->pmc_ext $3 = (struct PMC_EXT *) 0x0 (gdb) p interpreter->pmc_reg.registers[cur_opcode[2]]->obj $4 = {u = {_b = {_bufstart = 0x82dd8b0, _buflen = 0}, _ptrs = { _struct_val = 0x82dd8b0, _pmc_val = 0x0}, _i = {_int_val = 137222320, _int_val2 = 0}, _num_val = 6.7796834154634202e-316, _string_val = 0x82dd8b0}, flags = 512, _pobj_version = 0} -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) > > 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. (Though > that segfault's pretty unpleasant -- could you enable coredumps and > see what the backtrace looks like?) Try doing: > > null $S0 > loadlib self_lib, $S0 > > and see if it works better. > > 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 >