From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 32D473858C83; Sun, 24 Apr 2022 22:51:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 32D473858C83 From: "goldstein.w.n at gmail dot com" To: glibc-bugs@sourceware.org Subject: [Bug string/29088] On x86_64 all versions of memrchr can segfault with seemingly valid inputs. Date: Sun, 24 Apr 2022 22:51:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: string X-Bugzilla-Version: 2.36 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: goldstein.w.n at gmail 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: Message-ID: In-Reply-To: References: 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 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2022 22:51:17 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29088 --- Comment #3 from Noah Goldstein --- (In reply to Andreas Schwab from comment #2) > "Where an argument declared as size_t n specifies the length of the array > for a function, n can have the value zero on a call to that function.=20 > Unless explicitly stated otherwise in the description of a particular > function in this subclause, pointer arguments on such a call shall still > have valid values, as described in 7.1.4." I see. `Test - 0` SSE2 bug is not a bug then. Does 'pointer arguments on such a call shall still have valid values' imply= a certain amount of memory that must be valid or just a single byte? If its j= ust a single byte the second bug is still a bug as each of them over-reads into= a vector register. --=20 You are receiving this mail because: You are on the CC list for the bug.=