bash44-001 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 4.4
  4. Patch-ID: bash44-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. Bash-4.4 changed the way the history list is initially allocated to reduce
  10. the number of reallocations and copies. Users who set HISTSIZE to a very
  11. large number to essentially unlimit the size of the history list will get
  12. memory allocation errors
  13. Patch (apply with `patch -p0'):
  14. *** ../bash-4.4/lib/readline/history.c 2015-12-28 13:50:31.000000000 -0500
  15. --- lib/readline/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. *** ../bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
  40. --- patchlevel.h 2016-10-01 11:01:28.000000000 -0400
  41. ***************
  42. *** 26,30 ****
  43. looks for to find the patch level (for the sccs version string). */
  44. ! #define PATCHLEVEL 0
  45. #endif /* _PATCHLEVEL_H_ */
  46. --- 26,30 ----
  47. looks for to find the patch level (for the sccs version string). */
  48. ! #define PATCHLEVEL 1
  49. #endif /* _PATCHLEVEL_H_ */