Re: Invalid memory reads in first_non_fsm_start_char_cstring (utf_validate.c)

2016-01-04 Thread Stefan Fuhrmann
On 03.01.2016 18:50, Hanno Böck wrote: On Sun, 3 Jan 2016 18:12:47 +0100 Branko Čibej wrote: GCC (or any other compiler) may do a lot of things, but it's not allowed to change the way APR pool allocation works. We're not using malloc(); we're using apr_palloc() & co. Okay, I think we have a

Re: Invalid memory reads in first_non_fsm_start_char_cstring (utf_validate.c)

2016-01-03 Thread Daniel Shahaf
Branko Čibej wrote on Sun, Jan 03, 2016 at 18:12:47 +0100: > On 03.01.2016 15:46, Hanno Böck wrote: > > On Sat, 26 Dec 2015 12:08:12 +0100 > > Branko Čibej wrote: > >> In this case the memory is both valid (i.e., known to be > >> allocated within the process) and properly aligned. The fact that it

Re: Invalid memory reads in first_non_fsm_start_char_cstring (utf_validate.c)

2016-01-03 Thread Árpád Goretity
> The fact that it may not have been explicitly initialized does not affect the correctness of the code; there's no undefined behaviour being invoked here. Please consult the relevant sections of the C standard. To be specific, see e.g. C99, 6.2.4.5: "The initial value of the object is indetermi

Re: Invalid memory reads in first_non_fsm_start_char_cstring (utf_validate.c)

2016-01-03 Thread Hanno Böck
On Sun, 3 Jan 2016 18:12:47 +0100 Branko Čibej wrote: > GCC (or any other compiler) may do a lot of things, but it's not > allowed to change the way APR pool allocation works. We're not using > malloc(); we're using apr_palloc() & co. Okay, I think we have a misunderstanding here. The error I e

Re: Invalid memory reads in first_non_fsm_start_char_cstring (utf_validate.c)

2016-01-03 Thread Branko Čibej
On 03.01.2016 15:46, Hanno Böck wrote: > On Sat, 26 Dec 2015 12:08:12 +0100 > Branko Čibej wrote: > >> There's a world of difference between invalid memory and uninitialized >> memory. > Well, yes, they are different things. Invalid memory is memory not > allocated. Uninitialized memory is memory

Re: Invalid memory reads in first_non_fsm_start_char_cstring (utf_validate.c)

2016-01-03 Thread Hanno Böck
On Sat, 26 Dec 2015 12:08:12 +0100 Branko Čibej wrote: > There's a world of difference between invalid memory and uninitialized > memory. Well, yes, they are different things. Invalid memory is memory not allocated. Uninitialized memory is memory that hasn't been assigned a value yet. But both a

Re: Invalid memory reads in first_non_fsm_start_char_cstring (utf_validate.c)

2015-12-26 Thread Branko Čibej
On 19.12.2015 00:03, Hanno Böck wrote: > Hi, > > I recently tested to compile subversion with address sanitizer and it > would immediately show a global out of bounds read when showing the > help screen (svn help). > > I actually was surprised that this seems to be semi-intentional. The > code in u

Invalid memory reads in first_non_fsm_start_char_cstring (utf_validate.c)

2015-12-18 Thread Hanno Böck
Hi, I recently tested to compile subversion with address sanitizer and it would immediately show a global out of bounds read when showing the help screen (svn help). I actually was surprised that this seems to be semi-intentional. The code in utf_validate.c has a comment stating that this reads u