Jan Dubois wrote:
Sorry, I have no idea what is going on. From looking at the Perl
sources, I get a bad vibe from the call_sv() inside Perl_init_os_extras()
in win32/win32.c. The Perl interpreter isn't fully initialized when
this function is called, so it is not clear to me that it is really
safe to use the Perl calling mechanism yet.
Just as an experiment, you could replace the whole block
/* load Win32 CORE stubs, assuming Win32CORE was statically linked */
if ((cv = get_cv("Win32CORE::bootstrap", 0))) {
dSP;
PUSHMARK(SP);
(void)call_sv((SV *)cv, G_EVAL|G_DISCARD|G_VOID);
}
with just a call to boot_Win32CORE() (and add the appropriate EXTERN
definition too), just to see if this makes the error go away.
I haven't got very far trying this yet. I've changed it to:
void boot_Win32CORE(CV* cv);
void
Perl_init_os_extras(void)
{
dTHX;
char *file = __FILE__;
CV *cv;
dXSUB_SYS;
boot_Win32CORE(cv);
newXS("Win32::SetChildShowWindow", w32_SetChildShowWindow, file);
}
for the perl.exe build (miniperl.exe unsurprisingly doesn't like that!),
but now I get an access violation when running perl.exe (even just -e "1"):
boot_Win32CORE(cv * 0x281b56b4 `string') line 86 + 8 bytes
Perl_init_os_extras() line 4593 + 9 bytes
S_parse_body(char * * 0x002227b8, void (void)* 0x28179557 xs_init(void))
line 2178
perl_parse(interpreter * 0x00226e08, void (void)* 0x28179557
xs_init(void), int 3, char * * 0x00222470, char * * 0x002227b8) line
1618 + 13 bytes
RunPerl(int 3, char * * 0x00222470, char * * 0x002227b8) line 259 + 29 bytes
main(int 3, char * * 0x00222470, char * * 0x00223280) line 23 + 18 bytes
PERL! mainCRTStartup + 227 bytes
KERNEL32! 7c816fd7()
The debugger shows "cv" in Perl_init_os_extras" is "`string'". Is this
right? Have I done the wrong thing?
--