>Can you help me by testing which branch did the fakeargv[0] acquire
>its value? i.e. line 54:
> S_procself_val(aTHX_ GvSV(tmpgv), fakeargv[0]);
>or line 59:
> sv_setpv(GvSV(tmpgv), fakeargv[0]);
>and if it's line 59, see if replacing fakeargv[0] with the string
>literal "par" cause the same problem?
>I'm really grateful for your effort on debugging this. :-)
I put a debug in to tell me when XS_Internals_PAR_BOOT was called, then I
wrapped each of the lines above in printf debug code to print the contents
of fakeargv[0].
I get output like this...
./par -I"/home/users/imc/perl5.8/lib/5.8.1/sun4-solaris-ld" -I"/home/users/i
mc/perl5.8/lib/5.8.1" -I"/home/users/imc/perl5.8/lib/site_perl/5.8.1/sun4-so
laris-ld" -I"/home/users/imc/perl5.8/lib/site_perl/5.8.1" -I"/home/users/imc
/perl5.8/lib/site_perl" -I"." -I../myldr/.. -I../blib/lib -B -O../script/par
l
Running XS_Internals_PAR_BOOT
before sv_setpv ./par
after sv_setpv ./par
before SvSETMAGIC ./par
after SvSETMAGIC ./pa
Running XS_Internals_PAR_BOOT
Couldn't open ./pa
Packing "../blib/lib/PAR.pm"...
<snipped tons of Packing, Written, blah>
It seems like the SvSETMAGIC call itself is corrupting fakeargv[0] somehow.
Here it is again, but with sv_setpv(GvSV(tmpgv), fakeargv[0]); replaced with
..
sprintf(tmpbuf, "%s\0", fakeargv[0]);
printf("before sv_setpv tmpbuf = %s\n", tmpbuf);
sv_setpv(GvSV(tmpgv), tmpbuf);
printf("after sv_setpv tmpbuf = %s\n", tmpbuf);
Running XS_Internals_PAR_BOOT
before sv_setpv ./par
before sv_setpv tmpbuf = ./par
after sv_setpv tmpbuf = ./par
after sv_setpv ./par
before SvSETMAGIC ./par
after SvSETMAGIC ./pa
Running XS_Internals_PAR_BOOT
Couldn't open ./pa
Seems even then, SvSETMAGIC is still corrupting fakeargv[0].
--
Ian Cass