forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sys-libs/readline: add upstream patch for excessive history memory al…
…locs #597006
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
sys-libs/readline/files/readline-7.0-history-alloclist.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters