From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 61B973858C52; Wed, 15 Nov 2023 09:32:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 61B973858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1700040744; bh=PBALNEyYhzpVA4C5cHwwxo6em37ac6ezNoeQKNB6YG4=; h=From:To:Subject:Date:From; b=RiLtxdvtZayrYMpp87viyFT/P0DZJJ31B2Oi+R49wFOYrGbpOCFYfbjP9FNpaH6qo 7MTFOAh7dukd/QkEmNUqwqRwH11gqqXhQoF28yg3lRlCBLPj8rXkdUrQB/8w3JcjWF K0jaCD6QZOE/VHH2TdAFX+E8VY62IEkOp9zJPaT8= From: "ludwig.rydberg at gaisler dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/31068] New: sysdeps: sparc: invalid data access in memset due to regression Date: Wed, 15 Nov 2023 09:32:23 +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: 2.36 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ludwig.rydberg at gaisler 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=3D31068 Bug ID: 31068 Summary: sysdeps: sparc: invalid data access in memset due to regression Product: glibc Version: 2.36 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libc Assignee: unassigned at sourceware dot org Reporter: ludwig.rydberg at gaisler dot com CC: drepper.fsp at gmail dot com Target Milestone: --- Description: When testing the glibc-master (2023-11-13) on sparc32 (leon) a memset regression was observed. The issue was introduced by commit a61933fe27df ("sparc: Remove bzero optimization").=20 How to reproduce: It can be reproduced running the "string/test-memset" test on sparc32. Fail rate: 100% Test output: string/test-memset.test-result: FAIL: string/test-memset original exit status 1 string/test-memset.out: Didn't expect signal from child: got `Segmentation fault' Root cause: The reason for the issue was that when moving the bzero routine to the end = of the memset, the branch jump in the end made a jump back to wrong label caus= ing the invalid data access. A fix has been implemented and will be submitted. -- glibc version: master d1dcb565a1fb (2023-11-13) - The issue was first observed in glibc-2.36. gcc version 10.2.0 (LEON Linux 5.10 Toolchain 1.4-87-gcd8128e) - sparc-gaisler-linux5.10 GNU ld (GNU Binutils) 2.34 glibc configure options: --prefix=3D/usr --enable-bind-now --host=3Dsparc-gaisler-linux5.10 --with-headers=3D$USER/git/linux-toolchain/build-gcc-linux64//opt/sparc-gai= sler-linux5.10/sysroot/usr/include --with-binutils=3D$USER/git/linux-toolchain/build-gcc-linux64/binutils/binu= tils --disable-default-pie libc_cv_forced_unwind=3Dyes libc_cv_ssp=3Dno Target: Linux buildroot 5.10.175-leon1.4 Host: Ubuntu 22.04 6.2.0-36-generic --=20 You are receiving this mail because: You are on the CC list for the bug.=