You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/05/24 15:15:34 UTC
svn commit: r1486044 - /subversion/trunk/subversion/libsvn_subr/subst.c
Author: stsp
Date: Fri May 24 13:15:34 2013
New Revision: 1486044
URL: http://svn.apache.org/r1486044
Log:
Revert r1485848 because it caused segfaults in 'svn diff' on a working
copy of Subversion's own trunk. The working copy is corrupted after
the crash, some working files contain binary garbage.
Also reported to dev@.
Modified:
subversion/trunk/subversion/libsvn_subr/subst.c
Modified: subversion/trunk/subversion/libsvn_subr/subst.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/subst.c?rev=1486044&r1=1486043&r2=1486044&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/subst.c (original)
+++ subversion/trunk/subversion/libsvn_subr/subst.c Fri May 24 13:15:34 2013
@@ -50,7 +50,6 @@
#include "svn_private_config.h"
#include "private/svn_string_private.h"
-#include "private/svn_eol_private.h"
/**
* The textual elements of a detranslated special file. One of these
@@ -1117,39 +1116,28 @@ translate_chunk(svn_stream_t *dst,
/* skip current EOL */
len += b->eol_str_len;
- if (b->keywords)
+ /* Check 4 bytes at once to allow for efficient pipelining
+ and to reduce loop condition overhead. */
+ while ((p + len + 4) <= end)
{
- /* Check 4 bytes at once to allow for efficient pipelining
- and to reduce loop condition overhead. */
- while ((p + len + 4) <= end)
- {
- if (interesting[(unsigned char)p[len]]
- || interesting[(unsigned char)p[len+1]]
- || interesting[(unsigned char)p[len+2]]
- || interesting[(unsigned char)p[len+3]])
- break;
-
- len += 4;
- }
-
- /* Found an interesting char or EOF in the next 4 bytes.
- Find its exact position. */
- while ((p + len) < end
- && !interesting[(unsigned char)p[len]])
- ++len;
- }
- else
- {
- /* use our optimized sub-routine to find the next EOL */
- const char *eol
- = svn_eol__find_eol_start((char *)p + len, end - p);
- len += (eol ? eol : end) - (p + len);
+ if (interesting[(unsigned char)p[len]]
+ || interesting[(unsigned char)p[len+1]]
+ || interesting[(unsigned char)p[len+2]]
+ || interesting[(unsigned char)p[len+3]])
+ break;
+
+ len += 4;
}
+
+ /* Found an interesting char or EOF in the next 4 bytes.
+ Find its exact position. */
+ while ((p + len) < end && !interesting[(unsigned char)p[len]])
+ ++len;
}
while (b->nl_translation_skippable ==
svn_tristate_true && /* can potentially skip EOLs */
p + len + 2 < end && /* not too close to EOF */
- eol_unchanged(b, p + len)); /* EOL format already ok */
+ eol_unchanged (b, p + len)); /* EOL format already ok */
while ((p + len) < end && !interesting[(unsigned char)p[len]])
len++;