Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-25 Thread Markus Armbruster
Blue Swirl writes: > On Thu, Jan 24, 2013 at 5:17 PM, Andreas Färber wrote: >> Am 17.01.2013 21:13, schrieb Blue Swirl: >>> On Mon, Jan 14, 2013 at 9:09 AM, Stefan Hajnoczi wrote: Tell me what you consider the "correct" tab width for readers and I'll find a piece of QEMU code that was

Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-25 Thread Andreas Färber
Am 25.01.2013 19:07, schrieb Blue Swirl: > On Thu, Jan 24, 2013 at 5:17 PM, Andreas Färber wrote: >> Am 17.01.2013 21:13, schrieb Blue Swirl: >>> On Mon, Jan 14, 2013 at 9:09 AM, Stefan Hajnoczi wrote: Tell me what you consider the "correct" tab width for readers and I'll find a piece o

Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-25 Thread Blue Swirl
On Thu, Jan 24, 2013 at 5:17 PM, Andreas Färber wrote: > Am 17.01.2013 21:13, schrieb Blue Swirl: >> On Mon, Jan 14, 2013 at 9:09 AM, Stefan Hajnoczi wrote: >>> Tell me what you consider the "correct" tab width for readers and I'll >>> find a piece of QEMU code that was authored for a different t

Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-24 Thread Andreas Färber
Am 17.01.2013 21:13, schrieb Blue Swirl: > On Mon, Jan 14, 2013 at 9:09 AM, Stefan Hajnoczi wrote: >> Tell me what you consider the "correct" tab width for readers and I'll >> find a piece of QEMU code that was authored for a different tab width >> :). > > 8. So FWIW one exception is target-cris

Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-21 Thread Blue Swirl
On Mon, Jan 21, 2013 at 1:58 PM, Stefan Hajnoczi wrote: > On Sat, Jan 19, 2013 at 09:04:57AM +, Blue Swirl wrote: >> On Fri, Jan 18, 2013 at 11:04 AM, Stefan Hajnoczi wrote: >> > On Thu, Jan 17, 2013 at 08:13:38PM +, Blue Swirl wrote: >> >> On Mon, Jan 14, 2013 at 9:09 AM, Stefan Hajnoczi

Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-21 Thread Stefan Hajnoczi
On Sat, Jan 19, 2013 at 09:04:57AM +, Blue Swirl wrote: > On Fri, Jan 18, 2013 at 11:04 AM, Stefan Hajnoczi wrote: > > On Thu, Jan 17, 2013 at 08:13:38PM +, Blue Swirl wrote: > >> On Mon, Jan 14, 2013 at 9:09 AM, Stefan Hajnoczi > >> wrote: > >> > On Sat, Jan 12, 2013 at 10:46:18AM +

Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-19 Thread Blue Swirl
On Fri, Jan 18, 2013 at 11:04 AM, Stefan Hajnoczi wrote: > On Thu, Jan 17, 2013 at 08:13:38PM +, Blue Swirl wrote: >> On Mon, Jan 14, 2013 at 9:09 AM, Stefan Hajnoczi wrote: >> > On Sat, Jan 12, 2013 at 10:46:18AM +, Blue Swirl wrote: >> >> On Thu, Jan 10, 2013 at 12:43 PM, Stefan Hajnocz

Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-18 Thread Stefan Hajnoczi
On Thu, Jan 17, 2013 at 08:13:38PM +, Blue Swirl wrote: > On Mon, Jan 14, 2013 at 9:09 AM, Stefan Hajnoczi wrote: > > On Sat, Jan 12, 2013 at 10:46:18AM +, Blue Swirl wrote: > >> On Thu, Jan 10, 2013 at 12:43 PM, Stefan Hajnoczi > >> wrote: > >> > On Wed, Jan 09, 2013 at 08:43:51PM +

Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-17 Thread Blue Swirl
On Mon, Jan 14, 2013 at 9:09 AM, Stefan Hajnoczi wrote: > On Sat, Jan 12, 2013 at 10:46:18AM +, Blue Swirl wrote: >> On Thu, Jan 10, 2013 at 12:43 PM, Stefan Hajnoczi wrote: >> > On Wed, Jan 09, 2013 at 08:43:51PM +, Blue Swirl wrote: >> >> On Tue, Jan 8, 2013 at 9:03 AM, Stefan Hajnoczi

Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-14 Thread Stefan Hajnoczi
On Sat, Jan 12, 2013 at 10:46:18AM +, Blue Swirl wrote: > On Thu, Jan 10, 2013 at 12:43 PM, Stefan Hajnoczi wrote: > > On Wed, Jan 09, 2013 at 08:43:51PM +, Blue Swirl wrote: > >> On Tue, Jan 8, 2013 at 9:03 AM, Stefan Hajnoczi wrote: > >> > On Mon, Jan 07, 2013 at 03:38:39PM -0500, Nicko

Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-12 Thread Blue Swirl
On Thu, Jan 10, 2013 at 12:43 PM, Stefan Hajnoczi wrote: > On Wed, Jan 09, 2013 at 08:43:51PM +, Blue Swirl wrote: >> On Tue, Jan 8, 2013 at 9:03 AM, Stefan Hajnoczi wrote: >> > On Mon, Jan 07, 2013 at 03:38:39PM -0500, Nickolai Zeldovich wrote: >> >> memcpy() for overlapping regions is undef

Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-10 Thread Stefan Hajnoczi
On Wed, Jan 09, 2013 at 08:43:51PM +, Blue Swirl wrote: > On Tue, Jan 8, 2013 at 9:03 AM, Stefan Hajnoczi wrote: > > On Mon, Jan 07, 2013 at 03:38:39PM -0500, Nickolai Zeldovich wrote: > >> memcpy() for overlapping regions is undefined behavior; use memmove() > >> instead in readline_hist_add(

Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-09 Thread Blue Swirl
On Tue, Jan 8, 2013 at 9:03 AM, Stefan Hajnoczi wrote: > On Mon, Jan 07, 2013 at 03:38:39PM -0500, Nickolai Zeldovich wrote: >> memcpy() for overlapping regions is undefined behavior; use memmove() >> instead in readline_hist_add(). >> >> Signed-off-by: Nickolai Zeldovich >> --- >> readline.c |

Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-08 Thread Stefan Hajnoczi
On Mon, Jan 07, 2013 at 03:38:39PM -0500, Nickolai Zeldovich wrote: > memcpy() for overlapping regions is undefined behavior; use memmove() > instead in readline_hist_add(). > > Signed-off-by: Nickolai Zeldovich > --- > readline.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) I

Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-07 Thread Richard Henderson
On 01/07/2013 12:38 PM, Nickolai Zeldovich wrote: > memcpy() for overlapping regions is undefined behavior; use memmove() > instead in readline_hist_add(). > > Signed-off-by: Nickolai Zeldovich > --- > readline.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) This probably shoul

[Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-07 Thread Nickolai Zeldovich
memcpy() for overlapping regions is undefined behavior; use memmove() instead in readline_hist_add(). Signed-off-by: Nickolai Zeldovich --- readline.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readline.c b/readline.c index 5fc9643..aeccc7b 100644 --- a/readline.c