public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/31068] New: sysdeps: sparc: invalid data access in memset due to regression
@ 2023-11-15  9:32 ludwig.rydberg at gaisler dot com
  2023-11-15  9:34 ` [Bug libc/31068] " sam at gentoo dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ludwig.rydberg at gaisler dot com @ 2023-11-15  9:32 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31068

            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"). 

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 causing
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=/usr --enable-bind-now --host=sparc-gaisler-linux5.10
--with-headers=$USER/git/linux-toolchain/build-gcc-linux64//opt/sparc-gaisler-linux5.10/sysroot/usr/include
--with-binutils=$USER/git/linux-toolchain/build-gcc-linux64/binutils/binutils
--disable-default-pie libc_cv_forced_unwind=yes libc_cv_ssp=no

Target: Linux buildroot 5.10.175-leon1.4
Host: Ubuntu 22.04 6.2.0-36-generic

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-02-01 20:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-15  9:32 [Bug libc/31068] New: sysdeps: sparc: invalid data access in memset due to regression ludwig.rydberg at gaisler dot com
2023-11-15  9:34 ` [Bug libc/31068] " sam at gentoo dot org
2023-11-16 14:11 ` adhemerval.zanella at linaro dot org
2024-02-01 20:06 ` pinskia at gcc dot gnu.org
2024-02-01 20:14 ` glaubitz at physik dot fu-berlin.de
2024-02-01 20:51 ` adhemerval.zanella at linaro dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).