Open p5pRT opened 10 years ago
This is a very strange bug\, maybe with Windows XP SP3 specifically but it causes ExtUtils-Constant to fail on no PERL_IMPLICIT_SYS builds. DynaLoader and XSLoader both call win32_dynaload which contains the actual call to the Win OS (LoadLibraryExA). With PerlDir_mapA\, which does something on PERL_IMPLICIT_SYS builds. PerlDir_mapA will convert relative paths "../../lib/auto/something/something.dll" to absolute paths through VDir::MapPathA. How VDir::MapPathA converts relative to absolute paths IDK. But anyway. Without PerlDir_mapA\, LoadLibraryExA will get a relative path. Perl uses the flag LOAD_WITH_ALTERED_SEARCH_PATH. On MSDN today the description for the flag is.
--------------------------------------------
C:\sources\dlbug\src\cpan\ExtUtils-Constant\ext-8164>C:\perl519\nothd\bin\perl.
xe "-I..\..\..\lib" t.pl ..\..\..\lib\auto\Win32\Win32.dll
INC is
..\..\..\lib
C:/perl519/nothd/site/lib
C:\sources\dlbug\src\cpan\ExtUtils-Constant\ext-8164>C:\perl519\nosys\bin\perl.
xe "-I..\..\..\lib" t.pl ..\..\..\lib\auto\Win32\Win32.dll
INC is
..\..\..\lib
C:/perl519/nosys/site/lib
Can't load '..\..\..\lib\auto\Win32\Win32.dll' for module
ThisIsUnknownName: lo
d_file:The specified procedure could not be found at t.pl line 16.
at t.pl line 16.
C:\sources\dlbug\src\cpan\ExtUtils-Constant\ext-8164>C:\perl519\bin\perl.exe
"-
..\..\..\lib" t.pl ..\..\..\lib\auto\Win32\Win32.dll
INC is
..\..\..\lib
C:/perl519/site/lib
Can't load '..\..\..\lib\auto\Win32\Win32.dll' for module
ThisIsUnknownName: lo
d_file:The specified procedure could not be found at t.pl line 16.
at t.pl line 16.
C:\sources\dlbug\src\cpan\ExtUtils-Constant\ext-8164>
------------------------------------------
All successful. Now 1 dir down.
------------------------------------------
C:\sources\dlbug\src\cpan\ExtUtils-Constant\ext-8164\aaa>C:\perl519\nothd\bin\pe
rl.exe "-I..\..\..\..\lib" t.pl ..\..\..\..\lib\auto\Win32\Win32.dll
INC is
..\..\..\..\lib
C:/perl519/nothd/site/lib
Can't load '..\..\..\..\lib\auto\Win32\Win32.dll' for module
ThisIsUnknownName:
load_file:%1 is not a valid Win32 application at t.pl line 16.
at t.pl line 16.
C:\sources\dlbug\src\cpan\ExtUtils-Constant\ext-8164\aaa>C:\perl519\nosys\bin\pe
rl.exe "-I..\..\..\..\lib" t.pl ..\..\..\..\lib\auto\Win32\Win32.dll
INC is
..\..\..\..\lib
C:/perl519/nosys/site/lib
Can't load '..\..\..\..\lib\auto\Win32\Win32.dll' for module
ThisIsUnknownName:
load_file:%1 is not a valid Win32 application at t.pl line 16.
at t.pl line 16.
C:\sources\dlbug\src\cpan\ExtUtils-Constant\ext-8164\aaa>C:\perl519\bin\perl.exe
"-I..\..\..\..\lib" t.pl ..\..\..\..\lib\auto\Win32\Win32.dll
INC is
..\..\..\..\lib
C:/perl519/site/lib
Can't load '..\..\..\..\lib\auto\Win32\Win32.dll' for module
ThisIsUnknownName:
load_file:The specified procedure could not be found at t.pl line 16.
at t.pl line 16.
C:\sources\dlbug\src\cpan\ExtUtils-Constant\ext-8164\aaa>
---------------------------------------------
nothd and nosys failed. With imp sys passed. "is not a valid Win32
application " means the poisoned 0 byte Win32.dll was attempted to be
loaded, that is the ONLY "fail" condition for this bug. Now 1 more dir
down, so we are 5 deep.
---------------------------------------------
C:\sources\dlbug\src\cpan\ExtUtils-Constant\ext-8164\aaa\bbb>C:\perl519\bin\perl
.exe "-I..\..\..\..\..\lib" t.pl ..\..\..\..\..\lib\auto\Win32\Win32.dll
INC is
..\..\..\..\..\lib
C:/perl519/site/lib
Can't load '..\..\..\..\..\lib\auto\Win32\Win32.dll' for module
ThisIsUnknownNam
e: load_file:The specified procedure could not be found at t.pl line 16.
at t.pl line 16.
C:\sources\dlbug\src\cpan\ExtUtils-Constant\ext-8164\aaa\bbb>C:\perl519\nothd\bi
n\perl.exe "-I..\..\..\..\..\lib" t.pl
..\..\..\..\..\lib\auto\Win32\Win32.dll
INC is
..\..\..\..\..\lib
C:/perl519/nothd/site/lib
C:\sources\dlbug\src\cpan\ExtUtils-Constant\ext-8164\aaa\bbb>C:\perl519\nosys\bi
n\perl.exe "-I..\..\..\..\..\lib" t.pl
..\..\..\..\..\lib\auto\Win32\Win32.dll
INC is
..\..\..\..\..\lib
C:/perl519/nosys/site/lib
Can't load '..\..\..\..\..\lib\auto\Win32\Win32.dll' for module
ThisIsUnknownNam
e: load_file:The specified procedure could not be found at t.pl line 16.
at t.pl line 16.
C:\sources\dlbug\src\cpan\ExtUtils-Constant\ext-8164\aaa\bbb>
----------------------------------------------
All passed.
In ExtUtils-Constant dir "aaa" is "0". But names dont matter\, apparantly only their ".." positions do.
I dont have any ideas what to do about this.
Now for the -V of the 3 perls used above.
On Wed Mar 26 17:13:50 2014\, bulk88 wrote:
On MSDN today the description for the flag is.
------------------------------------------- If this value is used and lpFileName specifies an absolute path\, the system uses the alternate file search strategy discussed in the Remarks section to find associated executable modules that the specified module causes to be loaded. If this value is used and lpFileName specifies a relative path\, the behavior is undefined.
If this value is not used\, or if lpFileName does not specify a path\, the system uses the standard search strategy discussed in the Remarks section to find associated executable modules that the specified module causes to be loaded.
This value cannot be combined with any LOAD_LIBRARY_SEARCH flag. -------------------------------------------
Forgot to add\, in an old "Longhorn" MSDN\, the no relative paths warning isnt there\,
If this value is used\, and lpFileName specifies a path\, the system uses the alternate file search strategy discussed in the Remarks section to find associated executable modules that the specified module causes to be loaded.
If this value is not used\, or if lpFileName does not specify a path\, the system uses the standard search strategy discussed in the Remarks section to find associated executable modules that the specified module causes to be loaded.
-- bulk88 ~ bulk88 at hotmail.com
This is still a bug in blead/5.21.4 (ran into it again).
-- bulk88 ~ bulk88 at hotmail.com
Migrated from rt.perl.org#121513 (status was 'new')
Searchable as RT121513$