From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2178) id B104B3858D37; Fri, 28 Apr 2023 15:12:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B104B3858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1682694726; bh=roLUlwSOxdw29TUikTcawd3CGfkt/pKIVtXeEoq5sFs=; h=From:To:Subject:Date:From; b=H+6H7bUTS9w13cWdN7HjfwfGFXE8Nhccr0SLNm0Xw9AzRi8DtPptU9415D6yPIZaY Qra/K+WS77LIoFfRdhPCrCBTYD5vEP1sBGZyf0IArHW2p9h2+UnLdH1MMK1yM5hifP kQPVVyWDeMBJ20DsY1BOpuB11/hrjZmgjcU442wg= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Florian Weimer To: glibc-cvs@sourceware.org Subject: [glibc/release/2.37/master] gmon: Revert addition of tunables to preserve GLIBC_PRIVATE ABI X-Act-Checkin: glibc X-Git-Author: Florian Weimer X-Git-Refname: refs/heads/release/2.37/master X-Git-Oldrev: ff3a71ec1fc02757b38c9c3209118d14dd10c7b6 X-Git-Newrev: a908c18d47925d23f5b85a21c1b81254fc0c3a44 Message-Id: <20230428151206.B104B3858D37@sourceware.org> Date: Fri, 28 Apr 2023 15:12:06 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a908c18d47925d23f5b85a21c1b81254fc0c3a44 commit a908c18d47925d23f5b85a21c1b81254fc0c3a44 Author: Florian Weimer Date: Fri Apr 28 17:07:38 2023 +0200 gmon: Revert addition of tunables to preserve GLIBC_PRIVATE ABI Otherwise, processes are likely to crash during concurrent updates to a new glibc version on the stable release branch. The test gmon/tst-mcount-overflow depends on those tunables, so it has to be removed as well. Diff: --- gmon/Makefile | 14 +------------- gmon/gmon.c | 16 ---------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/gmon/Makefile b/gmon/Makefile index 213622a7ad..fbe2b0ba5c 100644 --- a/gmon/Makefile +++ b/gmon/Makefile @@ -26,7 +26,7 @@ include ../Makeconfig headers := sys/gmon.h sys/gmon_out.h sys/profil.h routines := gmon mcount profil sprofil prof-freq -tests = tst-sprofil tst-gmon tst-mcount-overflow tst-mcleanup +tests = tst-sprofil tst-gmon tst-mcleanup ifeq ($(build-profile),yes) tests += tst-profile-static tests-static += tst-profile-static @@ -57,18 +57,6 @@ ifeq ($(run-built-tests),yes) tests-special += $(objpfx)tst-gmon-gprof.out endif -CFLAGS-tst-mcount-overflow.c := -fno-omit-frame-pointer -pg -tst-mcount-overflow-no-pie = yes -CRT-tst-mcount-overflow := $(csu-objpfx)g$(start-installed-name) -# Intentionally use invalid config where maxarcs&1 1>/dev/null | cat -ifeq ($(run-built-tests),yes) -tests-special += $(objpfx)tst-mcount-overflow-check.out -endif - CFLAGS-tst-mcleanup.c := -fno-omit-frame-pointer -pg tst-mcleanup-no-pie = yes CRT-tst-mcleanup := $(csu-objpfx)g$(start-installed-name) diff --git a/gmon/gmon.c b/gmon/gmon.c index 5e99a7351d..97be1f72ca 100644 --- a/gmon/gmon.c +++ b/gmon/gmon.c @@ -46,11 +46,6 @@ #include #include -#if HAVE_TUNABLES -# define TUNABLE_NAMESPACE gmon -# include -#endif - #ifdef PIC # include @@ -130,20 +125,9 @@ __monstartup (u_long lowpc, u_long highpc) struct gmonparam *p = &_gmonparam; long int minarcs, maxarcs; -#if HAVE_TUNABLES - /* Read minarcs/maxarcs tunables. */ - minarcs = TUNABLE_GET (minarcs, int32_t, NULL); - maxarcs = TUNABLE_GET (maxarcs, int32_t, NULL); - if (maxarcs < minarcs) - { - ERR("monstartup: maxarcs < minarcs, setting maxarcs = minarcs\n"); - maxarcs = minarcs; - } -#else /* No tunables, we use hardcoded defaults */ minarcs = MINARCS; maxarcs = MAXARCS; -#endif /* * If we are incorrectly called twice in a row (without an