From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4B1983858C30; Mon, 5 Feb 2024 11:44:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4B1983858C30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707133454; bh=HJi24ieydxFQyvdxbhMHUyiRId02mHpFMu3f+wG6D+w=; h=From:To:Subject:Date:From; b=Xj6+1uVz8Swy0ben4c/sv3LSCYfKUNDCFP9Yg+++SamDJ94tB1Vl2CKJEJebgvW4B TRlK/WfSsUKsZqV6B9Dl3OloXnBxEpjGdWFw3kiavij2n7ley4leCQIlCn88SxclSn 8KPwvq6jKxVygyzyLELv0PmatWm0jLDO4ziXJe1I= From: "adrian.ratiu at collabora dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/31339] New: arm32 loader crash after cleanup in 2.36 Date: Mon, 05 Feb 2024 11:44:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: adrian.ratiu at collabora dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31339 Bug ID: 31339 Summary: arm32 loader crash after cleanup in 2.36 Product: glibc Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: libc Assignee: unassigned at sourceware dot org Reporter: adrian.ratiu at collabora dot com CC: drepper.fsp at gmail dot com Target Milestone: --- Hello, An ARM32 loader crash was noticed while upgrading glibc in ChromiumOS, which George, (added to CC), tracked down to this cleanup commit: https://sourceware.org/git/?p=3Dglibc.git;a=3Dcommit;h=3D49d877a80b29d30028= 87b084eec6676d9f5fec18 In a nutshell, we believe that commit forgot to remove an unnecessary "ldr r4, [sl, r4]" in _dl_start_user which causes programs to crash because, according to the arm32 ABI, r4 is a caller-saved register, so using its value after the above cleanup commit doesn't make much sense, as the commit removed its initialization. Also the result of this ldr is not used, which is a further indication this crashing instruction was missed during the cleanup. George applied the following patch which fixed the crash in CrOS: diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index b857bbc868..dd1a0f6b6e 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -139,7 +139,6 @@ _start:\n\ _dl_start_user:\n\ adr r6, .L_GET_GOT\n\ add sl, sl, r6\n\ - ldr r4, [sl, r4]\n\ @ save the entry point in another register\n\ mov r6, r0\n\ @ get the original arg count\n\ Can glibc please also apply this fix? The original debugging/investigation into this issue is public, though it requires a google/gmail account: https://issuetracker.google.com/u/1/issues/322172904 Thank you, Adrian --=20 You are receiving this mail because: You are on the CC list for the bug.=