From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 158EB1395E2 for ; Thu, 10 Nov 2016 06:03:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B92DDE0850; Thu, 10 Nov 2016 06:03:10 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A1875E0850 for ; Thu, 10 Nov 2016 06:03:10 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5C2D134165A for ; Thu, 10 Nov 2016 06:03:09 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BB3AE24B0 for ; Thu, 10 Nov 2016 06:03:07 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1478757674.4b0bd0d1d7636f79c4c1a65ab280c7f9009ff26e.vapier@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/readline/, sys-libs/readline/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/readline/files/readline-7.0-history-alloclist.patch sys-libs/readline/readline-7.0-r1.ebuild sys-libs/readline/readline-7.0.ebuild X-VCS-Directories: sys-libs/readline/files/ sys-libs/readline/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 4b0bd0d1d7636f79c4c1a65ab280c7f9009ff26e X-VCS-Branch: master Date: Thu, 10 Nov 2016 06:03:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 1061cdf2-e1b4-4752-a300-4f586c2d5bc1 X-Archives-Hash: 705183bebd0402788ea2fadcffa30bff commit: 4b0bd0d1d7636f79c4c1a65ab280c7f9009ff26e Author: Mike Frysinger gentoo org> AuthorDate: Thu Nov 10 06:01:14 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Thu Nov 10 06:01:14 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b0bd0d1 sys-libs/readline: add upstream patch for excessive history memory allocs #597006 .../files/readline-7.0-history-alloclist.patch | 29 ++++++++++++++++++++++ ...{readline-7.0.ebuild => readline-7.0-r1.ebuild} | 1 + 2 files changed, 30 insertions(+) diff --git a/sys-libs/readline/files/readline-7.0-history-alloclist.patch b/sys-libs/readline/files/readline-7.0-history-alloclist.patch new file mode 100644 index 00000000..73faa60 --- /dev/null +++ b/sys-libs/readline/files/readline-7.0-history-alloclist.patch @@ -0,0 +1,29 @@ +https://bugs.gentoo.org/597006 +https://lists.gnu.org/archive/html/bug-bash/2016-10/msg00010.html + +*** ../bash-4.4/lib/readline/history.c 2015-12-28 13:50:31.000000000 -0500 +--- lib/readline/history.c 2016-09-30 14:28:40.000000000 -0400 +*************** +*** 58,61 **** +--- 58,63 ---- + #define DEFAULT_HISTORY_INITIAL_SIZE 502 + ++ #define MAX_HISTORY_INITIAL_SIZE 8192 ++ + /* The number of slots to increase the_history by. */ + #define DEFAULT_HISTORY_GROW_SIZE 50 +*************** +*** 308,312 **** + { + if (history_stifled && history_max_entries > 0) +! history_size = history_max_entries + 2; + else + history_size = DEFAULT_HISTORY_INITIAL_SIZE; +--- 310,316 ---- + { + if (history_stifled && history_max_entries > 0) +! history_size = (history_max_entries > MAX_HISTORY_INITIAL_SIZE) +! ? MAX_HISTORY_INITIAL_SIZE +! : history_max_entries + 2; + else + history_size = DEFAULT_HISTORY_INITIAL_SIZE; diff --git a/sys-libs/readline/readline-7.0.ebuild b/sys-libs/readline/readline-7.0-r1.ebuild similarity index 98% rename from sys-libs/readline/readline-7.0.ebuild rename to sys-libs/readline/readline-7.0-r1.ebuild index 56fddcb..aecaa1c 100644 --- a/sys-libs/readline/readline-7.0.ebuild +++ b/sys-libs/readline/readline-7.0-r1.ebuild @@ -54,6 +54,7 @@ src_prepare() { epatch "${FILESDIR}"/${PN}-5.0-no_rpath.patch epatch "${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch #385091 epatch "${FILESDIR}"/${PN}-7.0-headers.patch + epatch "${FILESDIR}"/${PN}-7.0-history-alloclist.patch #597006 # Force ncurses linking. #71420 # Use pkg-config to get the right values. #457558