subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bert Huijben <b...@qqmail.nl>
Subject RE: svn commit: r1486044 -
Date Fri, 24 May 2013 17:45:12 GMT
 /subversion/trunk/subversion/libsvn_subr/subst.c
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

The diff command should never change the wc(no wclock, and no
db/pristine changes), so I really hope the problem that corrupts is
part of the merge on update, or we should check for another problem.

Bert From: stsp@apache.org
Sent: =E2=80=8E24/=E2=80=8E05/=E2=80=8E2013 15:15
To: commits@subversion.apache.org
Subject: 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/s=
ubst.c?rev=3D1486044&r1=3D1486043&r2=3D1486044&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- subversion/trunk/subversion/libsvn_subr/subst.c (original)
+++ subversion/trunk/subversion/libsvn_subr/subst.c Fri May 24 13:15:34 201=
3
@@ -50,7 +50,6 @@
 #include "svn_private_config.h"
=20
 #include "private/svn_string_private.h"
-#include "private/svn_eol_private.h"
=20
 /**
  * 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 +=3D b->eol_str_len;
=20
-              if (b->keywords)
+              /* Check 4 bytes at once to allow for efficient pipelining
+                 and to reduce loop condition overhead. */
+              while ((p + len + 4) <=3D end)
                 {
-                  /* Check 4 bytes at once to allow for efficient pipelini=
ng
-                    and to reduce loop condition overhead. */
-                  while ((p + len + 4) <=3D 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 +=3D 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
-                    =3D svn_eol__find_eol_start((char *)p + len, end - p);
-                  len +=3D (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 +=3D 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 =3D=3D
                    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 */
=20
           while ((p + len) < end && !interesting[(unsigned char)p[len]])
             len++;

Mime
View raw message