From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 993D43850437; Fri, 10 Feb 2023 22:04:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 993D43850437 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676066680; bh=S1lpwCI3eVdGJmX6aTJjk1ISSboke/RcwLDi3tomtWI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Ae+V5tm3TzxK/9wK6f5PIIYZvY4J0EFtuxFACeZFFxLef+SxXsTDjy9McoRATmQs1 Yf59f/gjuBKn6JSWuXzH4eBblHU0nXCkECC3ax6tLIfXwdLA00KaZwD2i9eGMTc8LL QYqsNfIYjlM+hmXIpFdMSf0WORGDPjxHNtm3hV3w= From: "skissane at gmail dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/30101] Memory corruption when incorrectly calling _mcleanup/__monstartup/moncontrol repeatedly or in wrong order Date: Fri, 10 Feb 2023 22:04:40 +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: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: skissane 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30101 --- Comment #3 from Simon Kissane --- Created V2 of patch. I realised "zero the _gmonparam buffer at end of _mcleanup" is not 100% correct, because (counterintuitively) 0=3DON, 3=3DOF= F, so zeroing the buffer actually makes it (incorrectly) report that profiling is= ON. So, after zeroing with memset, we then need to explicitly set state=3DOFF. --=20 You are receiving this mail because: You are on the CC list for the bug.=