http://bugs.winehq.org/show_bug.cgi?id=31603
Bug #: 31603 Summary: App manifests that specify processorArchitecture="*" fail to find assemblies Product: Wine Version: 1.5.12 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: ntdll AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com Classification: Unclassified
Doing unset WINEPREFIX rm -rf ~/.wine sh winetricks -q vcrun2008 cd ~/wine-git/dlls/msvcr90/tests WINEDLLOVERRIDES=msvcr90=n ~/wine-git/wine msvcr90_test.exe.so says msvcr90.c:243: Tests skipped: msvcr90.dll not installed (got 126)
This seems wrong; that dll is in fact installed. The app in question is built with the manifest http://source.winehq.org/source/dlls/msvcr90/tests/msvcr90.manifest which contains the line processorArchitecture="*"
Tracing through the code, lookup_manifest_file in ntdll/actctx.c seems to incorrectly parse the native DLL's manifest as having build 0 rather than 30729.
The problem appears to be that line 1872 assumes that the string lookup contains no *'s other than the ones in lookup_fmtW, and so doesn't skip to where it expected to when it does the strchrW:
1826 static const WCHAR wine_trailerW[] = {'d','e','a','d','b','e','e','f','.','m','a','n','i','f','e','s','t'};
1842 sprintfW( lookup, lookup_fmtW, ai->arch, ai->name, ai->public_key, 1843 ai->version.major, ai->version.minor, lang );
1872 tmp = dir_info->FileName + (strchrW(lookup, '*') - lookup); 1873 build = atoiW(tmp); 1874 if (build < min_build) continue;
If ai->arch contains a '*', as it does in tests/msvcr90.manifest, this assumption is violated. Changing the manifest to say processorArchitecture="x86" lets the test run and find the native DLL, at least on x86.
So, is the manifest wrong, or is lookup_manifest_file() wrong?
(This came up while I was trying to write tests for vcomp.dll. It was frustrating to find that the example I'd borrowed the manifest from was broken.)