Stas Bekman wrote:

before trying to look at your suggestions I want to have a clear understanding of the path this roller coaster takes to the failure. Can you please answer a few of these questions for this trace?

VMem::Free(void * 0x01208d6c) line 208 + 3 bytes
CPerlHost::Free(void * 0x01208d6c) line 59 + 34 bytes
PerlMemFree(IPerlMem * 0x01236e7c, void * 0x01208d6c) line 302
Perl_safesysfree(void * 0x01208d6c) line 143 + 26 bytes
Perl_sv_clear(interpreter * 0x002644c4, sv * 0x00924478) line 5196 + 13 bytes
Perl_sv_replace(interpreter * 0x002644c4, sv * 0x00924478, sv * 0x0126ec98) line 5046 + 13 bytes


It fails to free 'sv * 0x00924478', any idea what is it? You should be able to peek inside of it using:

  ((XPV*) (sv)->sv_any )->xpv_pv  // 2pvx\n\
  ((XPVIV*) (sv)->sv_any )->xiv_iv // 2ivx

or a global catch-all peek:

Perl_sv_peek(my_perl, (SV*)(sv)) // sv_peek

replace sv with the name of the variable. You can go up the stack with 'up' in order to look inside that variable.

Looks like you've cut-and-pasted that from perlhack, but that seems to relate to DDD+gdb. I'm using MSVC++, and have no idea how to do anything like that :(


Instead, I've done this: (If anyone (Randy?) knows a better way to do this, I'd love to hear it!)...

I've inserted:

   buf = savepv(SvPVX(sv));
   Safefree(buf);

into Perl_leave_scope(), just above the offending call to sv_replace(sv,value) on line 695 of Perl 5.8.1's scope.c, and rebuilt Perl and mod_perl.

I then find that buf contains "TestHooks::stacked_handlers2::filter" at the point where the subsequent call to sv_replace() crashes.



Perl_leave_scope(interpreter * 0x002644c4, long 290) line 695 + 17 bytes
Perl_newATTRSUB(interpreter * 0x002644c4, long 290, op * 0x01386e5c, op * 0x00000000, op * 0x00000000, op * 0x01386e7c) line 4402 + 24 bytes
Perl_utilize(interpreter * 0x002644c4, int 1, long 290, op * 0x00000000, op * 0x012970b4, op * 0x00000000) line 2983 + 173 bytes
Perl_yyparse(interpreter * 0x002644c4) line 414 + 44 bytes
S_doeval(interpreter * 0x002644c4, int 0, op * * 0x00000000, cv * 0x00000000, unsigned long 6743) line 2802 + 9 bytes
Perl_pp_require(interpreter * 0x002644c4) line 3298 + 102 bytes
modperl_pp_require(interpreter * 0x002644c4) line 54 + 10 bytes
Perl_runops_debug(interpreter * 0x002644c4) line 1434 + 13 bytes
S_call_body(interpreter * 0x002644c4, op * 0x0006f8c8, int 1) line 2193 + 13 bytes
Perl_eval_sv(interpreter * 0x002644c4, sv * 0x01268200, long 2) line 2253 + 15 bytes
modperl_require_module(interpreter * 0x002644c4, const char * 0x008ac6c8, int 0) line 13 + 15 bytes


Here we have a new perl interpreter, not the same one as started the require. What's inside 'const char * 0x008ac6c8'? what file is it loading?

"TestVhost::basic"




modperl_cmd_modules(cmd_parms_struct * 0x0006fa14, void * 0x00854718, const char * 0x008ac6c8) line 122 + 15 bytes
invoke_cmd(const command_struct * 0x10025038, cmd_parms_struct * 0x0006fa14, void * 0x00854718, const char * 0x008ac558) line 800 + 18 bytes
ap_walk_config_sub(const ap_directive_t * 0x008ac528, cmd_parms_struct * 0x0006fa14, ap_conf_vector_t * 0x0082caa8) line 1082 + 24 bytes
ap_walk_config(ap_directive_t * 0x008ac528, cmd_parms_struct * 0x0006fa14, ap_conf_vector_t * 0x0082caa8) line 1121 + 17 bytes
modperl_config_insert(interpreter * 0x0129104c, server_rec * 0x0082c4d8, apr_pool_t * 0x0028ace0, apr_pool_t * 0x00000000, int 150, char * 0x00000000, ap_conf_vector_t * 0x0082caa8, sv * 0x013834b8) line 443 + 18 bytes
modperl_config_insert_server(interpreter * 0x0129104c, server_rec * 0x0082c4d8, sv * 0x013834b8) line 461 + 36 bytes
XS_Apache__Server_add_config(interpreter * 0x0129104c, cv * 0x012e5338) line 99 + 17 bytes
Perl_pp_entersub(interpreter * 0x0129104c) line 2817 + 16 bytes
Perl_runops_debug(interpreter * 0x0129104c) line 1434 + 13 bytes
S_call_body(interpreter * 0x0129104c, op * 0x0006fbf8, int 1) line 2193 + 13 bytes
Perl_eval_sv(interpreter * 0x0129104c, sv * 0x012a92bc, long 2) line 2253 + 15 bytes
Perl_require_pv(interpreter * 0x0129104c, const char * 0x0088ad20) line 2351 + 15 bytes
modperl_require_file(interpreter * 0x0129104c, const char * 0x0088ad20, int 1) line 30 + 13 bytes


what's inside 'const char * 0x0088ad20'?

"conf/modperl_inc.pl"




modperl_config_apply_PerlRequire(server_rec * 0x00889e28, modperl_config_srv_t * 0x0088a848, interpreter * 0x0129104c, apr_pool_t * 0x0028ace0) line 357 + 21 bytes
modperl_startup(server_rec * 0x00889e28, apr_pool_t * 0x0028ace0) line 285 + 21 bytes
modperl_init_vhost(server_rec * 0x00889e28, apr_pool_t * 0x0028ace0, server_rec * 0x0082c4d8) line 355 + 13 bytes
modperl_init(server_rec * 0x0082c4d8, apr_pool_t * 0x0028ace0) line 431 + 17 bytes
modperl_hook_init(apr_pool_t * 0x0028ace0, apr_pool_t * 0x00000000, apr_pool_t * 0x00000000, server_rec * 0x0082c4d8) line 554 + 13 bytes
modperl_run() line 568 + 21 bytes
modperl_cmd_load_module(cmd_parms_struct * 0x0006fec8, void * 0x00854718, const char * 0x00864808) line 503
invoke_cmd(const command_struct * 0x100251b8, cmd_parms_struct * 0x0006fec8, void * 0x00854718, const char * 0x00864808) line 713 + 18 bytes
ap_walk_config_sub(const ap_directive_t * 0x008647e8, cmd_parms_struct * 0x0006fec8, ap_conf_vector_t * 0x0082caa8) line 1082 + 24 bytes
ap_walk_config(ap_directive_t * 0x008647e8, cmd_parms_struct * 0x0006fec8, ap_conf_vector_t * 0x0082caa8) line 1121 + 17 bytes
ap_process_config_tree(server_rec * 0x0082c4d8, ap_directive_t * 0x008549e8, apr_pool_t * 0x0028ace0, apr_pool_t * 0x0084c550) line 1594 + 20 bytes
main(int 8, const char * const * 0x00282918) line 582
mainCRTStartup() line 338 + 17 bytes
KERNEL32! 77e814c7()




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to