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 2014/08/12 17:28:50 UTC

svn commit: r1617507 - /subversion/trunk/subversion/libsvn_subr/debug.c

Author: stsp
Date: Tue Aug 12 15:28:49 2014
New Revision: 1617507

URL: http://svn.apache.org/r1617507
Log:
* subversion/libsvn_subr/debug.c
  (debug_vprintf): Increase local buffer size so clients built with
  SQLITE3_DEBUG don't assert in SVN_DBG() because SQL statements exceed
  the buffer size in length.

Modified:
    subversion/trunk/subversion/libsvn_subr/debug.c

Modified: subversion/trunk/subversion/libsvn_subr/debug.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/debug.c?rev=1617507&r1=1617506&r2=1617507&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/debug.c (original)
+++ subversion/trunk/subversion/libsvn_subr/debug.c Tue Aug 12 15:28:49 2014
@@ -80,7 +80,7 @@ static void
 debug_vprintf(const char *fmt, va_list ap)
 {
   FILE *output = debug_output;
-  char prefix[80], buffer[1000];
+  char prefix[80], buffer[4096];
   char *s = buffer;
   int n;
 



Re: svn commit: r1617507 - /subversion/trunk/subversion/libsvn_subr/debug.c

Posted by Branko Čibej <br...@wandisco.com>.
On 12.08.2014 17:28, stsp@apache.org wrote:
> Author: stsp
> Date: Tue Aug 12 15:28:49 2014
> New Revision: 1617507
>
> URL: http://svn.apache.org/r1617507
> Log:
> * subversion/libsvn_subr/debug.c
>   (debug_vprintf): Increase local buffer size so clients built with
>   SQLITE3_DEBUG don't assert in SVN_DBG() because SQL statements exceed
>   the buffer size in length.

The deeper question is, why is there even a single assert in the
debug_vprintf function? The buffers cannot overrun; and the fact that a
debug message was truncated is not a valid reason for asserting.

Those asserts should go away, IMO.

-- Brane


-- 
Branko Čibej | Director of Subversion
WANdisco | Realising the impossibilities of Big Data
e. brane@wandisco.com