From unknown Sat Jun 21 12:28:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77793: x64dbg cannot find builtin libraries references when running on the Guix's wine Resent-From: Carlos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 14 Apr 2025 04:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77793 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 77793@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17446057388059 (code B ref -1); Mon, 14 Apr 2025 04:43:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Apr 2025 04:42:18 +0000 Received: from localhost ([127.0.0.1]:45230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u4BeD-00025o-KH for submit@debbugs.gnu.org; Mon, 14 Apr 2025 00:42:18 -0400 Received: from lists.gnu.org ([2001:470:142::17]:51712) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u48Hl-0007QP-Rf for submit@debbugs.gnu.org; Sun, 13 Apr 2025 21:06:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u48Hg-00089b-7C for bug-guix@gnu.org; Sun, 13 Apr 2025 21:06:48 -0400 Received: from layka.disroot.org ([178.21.23.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u48Hd-0000OX-UH for bug-guix@gnu.org; Sun, 13 Apr 2025 21:06:47 -0400 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 4057425D17 for ; Mon, 14 Apr 2025 03:06:42 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 3HQTTBNGQOX9 for ; Mon, 14 Apr 2025 03:06:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1744592801; bh=RvYZHhCe9LxWarEa5v8y0+pnS08iqFye3prmNapOlHA=; h=Date:To:From:Subject; b=M6IdH4gO6QBWe5XZm8Lul3PQHaSjpAHohmo4xjq1mZw3yhSrx0qmvb13AJ1PR4Xiz Q2yMogw3JqNE1AkJidOrGMF2Pp72Oh01XJ7DQacIx91Ip7F9DSO0WdxMgNRc/yUOJc PCzdlIM/0+qdVwc4fDot5qlru/P/YFs+I2Sf71Jbi80ZLvP2xVfI3LvvJ6Z4WcIbzi rBeVK8gCz3IShu5sLUfHPK+oE2YLNMwu8XQmAHExryAAJGFxXXl8yJ/T7mtCPhfNWT d+LAkZHKAZa/ijMV3I6vI+oP1fzzAUVy019xWv24KCHUuOLz1yW64PWylsTyhJyfqb voCILSTDH6udA== Message-ID: Date: Mon, 14 Apr 2025 02:06:15 +0000 MIME-Version: 1.0 User-Agent: Icedove Daily Content-Language: en-US From: Carlos Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=178.21.23.139; envelope-from=gcarlos@disroot.org; helo=layka.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Mailman-Approved-At: Mon, 14 Apr 2025 00:42:15 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) Hi! I'm facing a strange bug on wine that seems to be present only on the guix build. In summary, I'm running a debugger through wine (x64dbg) and a specific functionality is misbehaving when compared with the same program running on another distributions (formerly, I use to get it working in Gentoo and Void Linux). The problem itself is that x64dbg seems to be unable to resolve builtin libraries at the import table of an executable. That is, if there's some random dll file used by the exe in the same directory, x64dbg is able to resolve it and show the symbols it exports and etc. But if the .exe is linked against some of the builtin dlls provided by wine, it just fails and shows the error "GetFileNameFromHandle failed", which is a function of x64dbg. Apparently, the point of code where this function is called on x64dbg is: https://github.com/x64dbg/x64dbg/blob/a5a25cc4a46d3823078050d548a5322849cb245c/src/dbg/commands/cmd-debug-control.cpp#L124 By the way, running wine with WINEDEBUG=warn+all shown some interesting log lines that occurs for a lot of dlls and is not present on the wine tested in another distribution, except for the first one: 0158:warn:file:NtCreateFile L"\\??\\Z:\\home\\mim\\projects\\gc\\gc2-client-cd\\shlwapi.dll" not found (c0000034) 0158:warn:module:virtual_map_builtin_module L"\\??\\C:\\windows\\system32\\shlwapi.dll" found in WINEDLLPATH but not a builtin, ignoring 0150:warn:file:NtCreateFile L"\\??\\Z:\\home\\mim\\projects\\gc\\gc2-client-cd\\x64dbg\\x32\\??? (GetFileNameFromHandle failed)" not found (c0000033) I've tested 3 versions of wine on guix: 9.0, 9.17 (the exact one that I had working on Void Linux) and 10.0. Thank you all, Carlos From unknown Sat Jun 21 12:28:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77793: x64dbg cannot find builtin libraries references when running on the Guix's wine Resent-From: Carlos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 19 Apr 2025 23:11:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77793 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 77793@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174510424326643 (code B ref -1); Sat, 19 Apr 2025 23:11:03 +0000 Received: (at submit) by debbugs.gnu.org; 19 Apr 2025 23:10:43 +0000 Received: from localhost ([127.0.0.1]:39853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u6HKc-0006vY-4A for submit@debbugs.gnu.org; Sat, 19 Apr 2025 19:10:43 -0400 Received: from lists.gnu.org ([2001:470:142::17]:42556) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u6HKZ-0006tc-2P for submit@debbugs.gnu.org; Sat, 19 Apr 2025 19:10:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u6HKR-0006sc-1C for bug-guix@gnu.org; Sat, 19 Apr 2025 19:10:31 -0400 Received: from layka.disroot.org ([178.21.23.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u6HKO-0003p8-Ou for bug-guix@gnu.org; Sat, 19 Apr 2025 19:10:30 -0400 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 2FAB520F8A for ; Sun, 20 Apr 2025 01:10:20 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id CqZ5Bz6FSmzs for ; Sun, 20 Apr 2025 01:10:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1745104219; bh=8+BQ+vM18XKIASnm9T39kaHQCb/HdHWkzs9YH8MdBsc=; h=Date:Subject:From:To:References:In-Reply-To; b=e5byQTo3p6x2lAOWg4aJPRyJnXkG9MmZy2hYx1RiIkDaxs5fBqXYcijvUjP6MjhzV Vi3XZEytQd6ntNqnqZ4uuKIDpRWWFb8kZsGAUF3wb80lyyEcMmc+2w3a1JP6rPqtra CX2Nbx7QZYqW9gt7rB5c58Lq6fHMt715yEfunBhz/uAPIFRqRpBhz6gqNMMgaBphW6 9ZUUFZ+zkxKP4vUrtE+yy2S4oYGYTz3+mC//XmfdqCzfiunWmdfK6lrPt09jemkSKF ELvpMCPsCQfSo/AzDFVBRqk1a6ohovOfgeB4d9q4GVde+ZXN/WGRi5CISM8y6WEbk6 1rJbg1qy6Lfwg== Message-ID: <9d83806c-a7db-465e-864d-62dc4dc3ce07@disroot.org> Date: Sat, 19 Apr 2025 23:09:36 +0000 MIME-Version: 1.0 User-Agent: Icedove Daily From: Carlos References: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=178.21.23.139; envelope-from=gcarlos@disroot.org; helo=layka.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) Just an update: I've found the root of this issue. The wine package doesn't use the mingw cross gcc to compile wine's native dlls. To address this, we need to use gcc-cross--w64-mingw32-toolchain as input for wine, as its build system will take care to find and automatically use it for compiling suitable things. I'll work on a patch for it.