readline70-001 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. READLINE PATCH REPORT
  2. =====================
  3. Readline-Release: 7.0
  4. Patch-ID: readline70-001
  5. Bug-Reported-by: Sean Zha <freeman_cha@hotmail.com>
  6. Bug-Reference-ID: <BN3PR01MB13657D9303EB94BF6E54216E8CCA0@BN3PR01MB1365.prod.exchangelabs.com>
  7. Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2016-09/msg00107.html
  8. Bug-Description:
  9. Readline-7.0 changed the way the history list is initially allocated to reduce
  10. the number of reallocations and copies. Users who set the readline
  11. history-size variable to a very large number to essentially unlimit the size
  12. of the history list will get memory allocation errors
  13. Patch (apply with `patch -p0'):
  14. *** ../readline-7.0/history.c 2015-12-28 13:50:31.000000000 -0500
  15. --- history.c 2016-09-30 14:28:40.000000000 -0400
  16. ***************
  17. *** 58,61 ****
  18. --- 58,63 ----
  19. #define DEFAULT_HISTORY_INITIAL_SIZE 502
  20. + #define MAX_HISTORY_INITIAL_SIZE 8192
  21. +
  22. /* The number of slots to increase the_history by. */
  23. #define DEFAULT_HISTORY_GROW_SIZE 50
  24. ***************
  25. *** 308,312 ****
  26. {
  27. if (history_stifled && history_max_entries > 0)
  28. ! history_size = history_max_entries + 2;
  29. else
  30. history_size = DEFAULT_HISTORY_INITIAL_SIZE;
  31. --- 310,316 ----
  32. {
  33. if (history_stifled && history_max_entries > 0)
  34. ! history_size = (history_max_entries > MAX_HISTORY_INITIAL_SIZE)
  35. ! ? MAX_HISTORY_INITIAL_SIZE
  36. ! : history_max_entries + 2;
  37. else
  38. history_size = DEFAULT_HISTORY_INITIAL_SIZE;
  39. *** ../readline-7.0/patchlevel 2013-11-15 08:11:11.000000000 -0500
  40. --- patchlevel 2014-03-21 08:28:40.000000000 -0400
  41. ***************
  42. *** 1,3 ****
  43. # Do not edit -- exists only for use by patch
  44. ! 0
  45. --- 1,3 ----
  46. # Do not edit -- exists only for use by patch
  47. ! 1