Closed p5pRT closed 20 years ago
If perl.exe and perl.dll are run from the directory c:\bin\, an access violation occurs when it is run. It appears that the drive is immaterial and there may be other directories that cause problems.
The problem is caused by the code:
ptr = strrchr(mod_name\, '\\'); if (!ptr || stricmp(ptr+1\, strip) != 0) { if(!(*strip == '5' && *(ptr+1) == '5' && strncmp(strip\, base\, 5) == 0 && strncmp(ptr+1\, base\, 5) == 0)) { ...
in get_emd_part() in win32.c (code reformated for email).
If strrchr() returns a null pointer\, !ptr is true and the controlled block is executed. In the second if\, *(ptr+1) then causes an access violation.
I've not yet completely analyzed this code or tested the fix\, but changing the first if to
if (ptr && stricmp(ptr+1\, strip) != 0)
appears to fix the problem.
This was compiled from the standard distribution with Microsoft Visual C++ 6.0.
Migrated from rt.perl.org#931 (status was 'resolved')
Searchable as RT931$