From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 41DFD39724A0; Wed, 28 Oct 2020 19:57:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 41DFD39724A0 From: "0x66726565 at gmail dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/26802] raise() marked __leaf__ is not C-compliant Date: Wed, 28 Oct 2020 19:57:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.30 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: 0x66726565 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: Wed, 28 Oct 2020 19:57:11 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26802 --- Comment #1 from Tadeus Prastowo <0x66726565 at gmail dot com> --- This paragraph written in the bug description is inaccurate as detailed in = [1]: Since glibc-2.30 raise() definitely runs a signal handler as required by th= e C standard, and the signal handler can be defined in the current compilation = unit to use static variables, then unless the C standard says that it is a UB to access a non-volatile object with static storage duration from within a sig= nal handler that is run using raise() on a normal execution path, the marking of raise() with __leaf__ makes raise() non-compliant with the C standard, and hence, this bug report. The correct one is as follows: Since glibc-2.30 raise() may run a signal handler that is defined in the current compilation unit to use static variables, then unless the C standard says that it is a UB to access a non-volatile object with static storage duration from within a signal handl= er that is run using raise() on a normal execution path, the marking of raise() with __leaf__ makes raise() non-compliant with the C standard, and hence, t= his bug report. [1] https://sourceware.org/pipermail/libc-help/2020-October/005522.html --=20 You are receiving this mail because: You are on the CC list for the bug.=