From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11207 invoked by alias); 16 Jan 2018 08:48:07 -0000 Mailing-List: contact libc-stable-help@sourceware.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: List-Archive: Sender: libc-stable-owner@sourceware.org Received: (qmail 11129 invoked by uid 89); 16 Jan 2018 08:48:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-Spam-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 16 Jan 2018 08:48:01 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C31C17EA81 for ; Tue, 16 Jan 2018 08:48:00 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-116-137.ams2.redhat.com [10.36.116.137]) by smtp.corp.redhat.com (Postfix) with ESMTP id 886655EDE5 for ; Tue, 16 Jan 2018 08:48:00 +0000 (UTC) Received: by oldenburg.str.redhat.com (Postfix, from userid 1000) id D5AA441610736; Tue, 16 Jan 2018 09:47:59 +0100 (CET) Date: Mon, 01 Jan 2018 00:00:00 -0000 To: libc-stable@sourceware.org Subject: [2.25 COMMITTED] nptl: Open libgcc.so with RTLD_NOW during pthread_cancel [BZ #22636] User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20180116084759.D5AA441610736@oldenburg.str.redhat.com> From: fweimer@redhat.com (Florian Weimer) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 16 Jan 2018 08:48:00 +0000 (UTC) X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00043.txt.bz2 Disabling lazy binding reduces stack usage during unwinding. Note that RTLD_NOW only makes a difference if libgcc.so has not already been loaded, so this is only a partial fix. Reviewed-by: Adhemerval Zanella (cherry picked from commit f993b8754080ac7572b692870e926d8b493db16c) 2018-01-10 Florian Weimer [BZ #22636] * sysdeps/nptl/unwind-forcedunwind.c (pthread_cancel_init): Open libgcc.so with RTLD_NOW, to avoid lazy binding during unwind. diff --git a/NEWS b/NEWS index fb54fa069c..e7eba7610d 100644 --- a/NEWS +++ b/NEWS @@ -66,6 +66,7 @@ The following bugs are resolved with this release: [21972] assert macro requires operator== (int) for its argument type [22078] nss_files performance issue in hosts multi mode [22322] libc: [mips64] wrong bits/long-double.h installed + [22636] PTHREAD_STACK_MIN is too small on x86-64 [22627] $ORIGIN in $LD_LIBRARY_PATH is substituted twice [22637] nptl: Fix stack guard size accounting [22679] getcwd(3) can succeed without returning an absolute path diff --git a/sysdeps/nptl/unwind-forcedunwind.c b/sysdeps/nptl/unwind-forcedunwind.c index 33a1975f5e..ace58b2468 100644 --- a/sysdeps/nptl/unwind-forcedunwind.c +++ b/sysdeps/nptl/unwind-forcedunwind.c @@ -49,7 +49,7 @@ pthread_cancel_init (void) return; } - handle = __libc_dlopen (LIBGCC_S_SO); + handle = __libc_dlopen_mode (LIBGCC_S_SO, RTLD_NOW | __RTLD_DLOPEN); if (handle == NULL || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL