Re: [13/13] fusion: Add tests for the IAssemblyEnum interface.
Hans Leidekker wrote:
-Hans
------------------------------------------------------------------------
Hi Hans, These tests crash on Vista with .NET 3.5 (not sure about other platforms/.NET versions yet). The enum_gac_assemblies function relies on the fact that ffd.cFileName contains 2 underscores. On Vista however I see some assemblies with a different format for the cFileName like: 6.0.0.0_en_31bf3856ad364e35 This explains the (first) crash as we dereference a pointer. So doing something like this fixes that piece: else if (depth == 1) { - ptr = strstr(ffd.cFileName, "__"); + CHAR version[MAX_PATH]; + + lstrcpyA(version, ffd.cFileName); + ptr = strstr(version, "_"); *ptr = '\0'; - ptr += 2; + ptr = strrchr(ffd.cFileName, '_'); + ptr += 1; sprintf(buf, "Version=%s, Culture=neutral, PublicKeyToken=%s", - ffd.cFileName, ptr); + version, ptr); This seems to work fine but than it crashes again while trying to free the memory "HeapFree(GetProcessHeap(), 0, asmname->data);" in test_enumerate. Just ignoring those HeapFree's doesn't fix it as we crash again later on. -- Cheers, Paul.
Hi Paul,
These tests crash on Vista with .NET 3.5 (not sure about other platforms/.NET versions yet). The enum_gac_assemblies function relies on the fact that ffd.cFileName contains 2 underscores. On Vista however I see some assemblies with a different format for the cFileName like:
6.0.0.0_en_31bf3856ad364e35
Yes, that test simply ignores the culture attribute. Is that one of your own machines? If so, can you try this patch? -Hans
Hans Leidekker wrote:
Hi Paul,
These tests crash on Vista with .NET 3.5 (not sure about other platforms/.NET versions yet). The enum_gac_assemblies function relies on the fact that ffd.cFileName contains 2 underscores. On Vista however I see some assemblies with a different format for the cFileName like:
6.0.0.0_en_31bf3856ad364e35
Yes, that test simply ignores the culture attribute. Is that one of your own machines? If so, can you try this patch?
-Hans
At least we don't crash at that point (but still at the HeapFree). The patch is not correct however as tracing shows in some cases: Culture=en_31bf3856ad364e35 (and that makes sense reading the patch ;) ) -- Cheers, Paul.
Paul Vriens wrote:
Hans Leidekker wrote:
Hi Paul,
These tests crash on Vista with .NET 3.5 (not sure about other platforms/.NET versions yet). The enum_gac_assemblies function relies on the fact that ffd.cFileName contains 2 underscores. On Vista however I see some assemblies with a different format for the cFileName like:
6.0.0.0_en_31bf3856ad364e35
Yes, that test simply ignores the culture attribute. Is that one of your own machines? If so, can you try this patch?
-Hans
At least we don't crash at that point (but still at the HeapFree). The patch is not correct however as tracing shows in some cases:
Culture=en_31bf3856ad364e35
(and that makes sense reading the patch ;) )
The second crash (HeapFree) is because we use strdup. Looks like on Windows strdup doesn't allocate memory on heap. I guess we should replace strdup by a HeapAlloc/lstrcpyA ? -- Cheers, Paul.
participants (2)
-
Hans Leidekker -
Paul Vriens