[PATCH] Use memmove instead of strcpy

2018-07-06 Thread Bernhard M. Wiedemann
In https://bugzilla.opensuse.org/show_bug.cgi?id=1100488 we found that depending on the build machine, bash-4.4's bash.html would contain the string Bahh instead of Bash strcpy can cause corruption when working on overlapping strings so we use memmove instead that handles this case correctly ---

[PATCH] Use memmove instead of strcpy

2018-07-06 Thread Bernhard M. Wiedemann
In https://bugzilla.opensuse.org/show_bug.cgi?id=1100488 we found that depending on the build machine, bash-4.4's bash.html would contain the string Bahh instead of Bash strcpy can cause corruption when working on overlapping strings so we use memmove instead that handles this case correctly ---

Re: Why are long functions slower?

2017-10-16 Thread Bernhard M. Wiedemann
On 2017-10-15 20:53, Eduardo A. Bustamante López wrote: > I have some questions: > > 1. Which specific versions of 4.3 and 4.4? > 2. Did you compile bash from source? (if so, what did you use for CFLAGS and > the configure script parameters? are you >using bash's malloc or the system malloc?)

Why are long functions slower?

2017-10-10 Thread Bernhard M. Wiedemann
Hi, today I was debugging performance issues with a 200KB bash script [1] with bash-4.3 and 4.4 and it seems that much of it came from a function call that took 0.1 seconds (and it was done in a loop for 37000 files) even though it basically just consisted of an if [[ 0 != 0 ]] ; then I also w