http://bugs.winehq.org/show_bug.cgi?id=35176
--- Comment #4 from Martin Storsjö wine@martin.st --- FWIW, I tried doing a similar workaround to what Richard mentioned, but I'm still running into crashes.
I've added this to the end of fixup_imports function in ntdll/loader.c:
// Any easier way to compare an UNICODE_STRING? if (wm->ldr.BaseDllName.Buffer[0] == 'c' && wm->ldr.BaseDllName.Buffer[1] == 'l' && wm->ldr.BaseDllName.Buffer[2] == '.' && wm->ldr.BaseDllName.Buffer[3] == 'e' && wm->ldr.BaseDllName.Buffer[4] == 'x' && wm->ldr.BaseDllName.Buffer[5] == 'e') { WINE_MODREF *extra = NULL; load_dll(load_path, L"c2.dll", 0, &extra); }
I've checked in alloc_thread_tls that tls_module_count is nonzero, but I'm still seeing crashes.