https://bugs.winehq.org/show_bug.cgi?id=49920
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |NOTOURBUG Status|UNCONFIRMED |RESOLVED
--- Comment #9 from Alexandre Julliard julliard@winehq.org --- Looking at your code, I suspect the bug is that the path of the custom ld-linux.so.2 loader ends up as the bin directory, and so we try to exec wine from there (the /usr/lib32/wine path). Normally that would fail and we'd fallback to WINELOADER (cf. loader_exec() in dlls/ntdll/unix/loader.c), but your exec replacement routine in libhookexecv.c is not going to fail for nonexistent paths, it will exec and then die when loading.
Detecting all possible failures would be tricky, but adding a simple "if (stat(path,&st)) return -1;" at the top of the execv hook may be good enough.