You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2013/03/25 16:51:50 UTC
svn commit: r1460731 -
/subversion/trunk/subversion/libsvn_subr/utf_validate.c
Author: philip
Date: Mon Mar 25 15:51:50 2013
New Revision: 1460731
URL: http://svn.apache.org/r1460731
Log:
* subversion/libsvn_subr/utf_validate.c
(first_non_fsm_start_char_cstring): Provide a compile-time way
to disable a bit of code that is incompatible with some memory
checking tools.
Modified:
subversion/trunk/subversion/libsvn_subr/utf_validate.c
Modified: subversion/trunk/subversion/libsvn_subr/utf_validate.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/utf_validate.c?rev=1460731&r1=1460730&r2=1460731&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/utf_validate.c (original)
+++ subversion/trunk/subversion/libsvn_subr/utf_validate.c Mon Mar 25 15:51:50 2013
@@ -308,6 +308,13 @@ first_non_fsm_start_char_cstring(const c
return data;
/* Scan the input one machine word at a time. */
+#ifndef SVN_UTF_NO_UNITIALISED_ACCESS
+ /* This may read allocated but initialised bytes beyond the
+ terminating null. Any such bytes are always readable and this
+ code operates correctly whatever the uninitialised values happen
+ to be. However memory checking tools such as valgrind and GCC
+ 4.8's address santitizer will object so this bit of code can be
+ disabled at compile time. */
for (; ; data += sizeof(apr_uintptr_t))
{
/* Check for non-ASCII chars: */
@@ -320,6 +327,7 @@ first_non_fsm_start_char_cstring(const c
if ((chunk & SVN__BIT_7_SET) != SVN__BIT_7_SET)
break;
}
+#endif
/* The remaining odd bytes will be examined the naive way: */
for (; ; ++data)