Re: Curious... on readline history patch -- round up memory allocs?

2016-11-15 Thread Eduardo Bustamante
The change was in reference to this bug report: http://lists.gnu.org/archive/html/bug-bash/2016-09/msg00107.html The problem was that bash tried to allocate memory from the start based on the value of HISTSIZE, but this proved problematic for users which used a large HISTSIZE to have unlimited his

Re: Curious... on readline history patch -- round up memory allocs?

2016-11-15 Thread L. A. Walsh
Eduardo Bustamante wrote: I think this is unnecessary, malloc (either the bash malloc in lib/malloc/malloc.c or the libc provided malloc) should already take care of requesting memory in page sized chunks. At least that's what I see here (morecore function): http://git.savannah.gnu.org/cgit/ba

Re: Curious... on readline history patch -- round up memory allocs?

2016-11-15 Thread Eduardo Bustamante
I think this is unnecessary, malloc (either the bash malloc in lib/malloc/malloc.c or the libc provided malloc) should already take care of requesting memory in page sized chunks. At least that's what I see here (morecore function): http://git.savannah.gnu.org/cgit/bash.git/tree/lib/malloc/malloc.

Curious... on readline history patch -- round up memory allocs?

2016-11-15 Thread L. A. Walsh
Saw the bit about bash-4.4 changing things to reduce reallocs/copies, and wondered if you'd thought about rounding up the allocations to the nearest page size (at least on linux): Something along the lines of: Ishtar:tools/bash/readline-7.0> diff -u history.c.orig history.c --- history.c 2015-12-

probs making bash-4.4(+ patches)

2016-11-15 Thread L. A. Walsh
Still having probs building bash-4.4 -- trying first, the builtin version of readline, and on running got: readline: ~/.inputrc: line 6: history-size=-1: unknown variable name readline: ~/.inputrc: line 35: completion-prefix-display-length=256: unknown variable name readline: ~/.inputrc: line 3

Re: bash integer overflow (?) with large HISTFILESIZE

2016-11-15 Thread Greg Wooledge
On Mon, Nov 14, 2016 at 08:39:27PM -0500, Patrick Donnelly wrote: > Bash Version: 4.4 > Patch Level: 0 > Release Status: release > > Description: > > With the latest version of bash just deployed in the Arch Linux > repositories, bash fails with HISTSIZE=2147483647: > > bash: xmalloc: cannot all

bash integer overflow (?) with large HISTFILESIZE

2016-11-15 Thread Patrick Donnelly
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/locale'