public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "linkw at linux dot ibm.com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug string/29197] __strncpy_power9() uses uninitialised register vs18 value for filling after \0 Date: Wed, 01 Jun 2022 08:04:17 +0000 [thread overview] Message-ID: <bug-29197-131-9gl8xdbBhX@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-29197-131@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=29197 Kewen.Lin <linkw at linux dot ibm.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |linkw at linux dot ibm.com --- Comment #1 from Kewen.Lin <linkw at linux dot ibm.com> --- Thanks for filing this, Zdenek! By referring to the existing code, one fix seems to be: diff --git a/sysdeps/powerpc/powerpc64/le/power9/strncpy.S b/sysdeps/powerpc/powerpc64/le/power9/strncpy.S index ae23161316..deb94671cc 100644 --- a/sysdeps/powerpc/powerpc64/le/power9/strncpy.S +++ b/sysdeps/powerpc/powerpc64/le/power9/strncpy.S @@ -352,7 +352,7 @@ L(zero_padding_loop): cmpldi cr6,r5,16 /* Check if length was reached. */ ble cr6,L(zero_padding_end) - stxv v18,0(r11) + stxv 32+v18,0(r11) addi r11,r11,16 addi r5,r5,-16 @@ -360,7 +360,7 @@ L(zero_padding_loop): L(zero_padding_end): sldi r10,r5,56 /* stxvl wants size in top 8 bits */ - stxvl v18,r11,r10 /* Partial store */ + stxvl 32+v18,r11,r10 /* Partial store */ blr .align 4 -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2022-06-01 8:04 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-29 19:39 [Bug string/29197] New: " zsojka at seznam dot cz 2022-05-30 9:35 ` [Bug string/29197] " fweimer at redhat dot com 2022-05-30 10:07 ` fweimer at redhat dot com 2022-05-30 10:07 ` fweimer at redhat dot com 2022-05-30 11:56 ` tuliom at ascii dot art.br 2022-05-30 14:05 ` carlos at redhat dot com 2022-06-01 8:04 ` linkw at linux dot ibm.com [this message] 2022-06-06 18:57 ` msc at linux dot ibm.com 2022-06-07 3:04 ` linkw at gcc dot gnu.org 2022-06-07 14:32 ` msc at linux dot ibm.com 2022-06-07 14:32 ` msc at linux dot ibm.com 2022-06-07 19:03 ` msc at linux dot ibm.com 2022-06-07 20:00 ` msc at linux dot ibm.com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-29197-131-9gl8xdbBhX@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).