Re: [PATCH] Prevent out-of-bounds access (PR sanitizer/59258)

2013-11-25 Thread Marek Polacek
On Mon, Nov 25, 2013 at 10:36:00AM +0100, Jakub Jelinek wrote: > On Mon, Nov 25, 2013 at 10:27:00AM +0100, Marek Polacek wrote: > > This fixes a thinko of mine: when I added another two elements to the > > ubsan data structure, I forgot to increase the size of the array. > > > > Alternatively, I c

Re: [PATCH] Prevent out-of-bounds access (PR sanitizer/59258)

2013-11-25 Thread Jakub Jelinek
On Mon, Nov 25, 2013 at 10:27:00AM +0100, Marek Polacek wrote: > This fixes a thinko of mine: when I added another two elements to the > ubsan data structure, I forgot to increase the size of the array. > > Alternatively, I could use an alloca for this (VLAs issue a warning > in C++03 and are thus

[PATCH] Prevent out-of-bounds access (PR sanitizer/59258)

2013-11-25 Thread Marek Polacek
This fixes a thinko of mine: when I added another two elements to the ubsan data structure, I forgot to increase the size of the array. Alternatively, I could use an alloca for this (VLAs issue a warning in C++03 and are thus no-go :(). I don't have a simple testcase for this. Valgrind/asan woul