[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: libneon/subversion bug

From: Joe Orton <joe_at_manyfish.co.uk>
Date: 2002-09-09 23:49:48 CEST

On Mon, Sep 09, 2002 at 06:08:26PM -0300, Gustavo Niemeyer wrote:
> I'm not sure if this is a bug in libneon (0.23.3) or subversion (3140),
> but a command like "svn co https://INEXISTANT/foo /foo/bar" has
> segfaulted inside libneon.

Thanks for the backtrace - does the patch below fix it? (If so, ra_dav
must treat a request failure as non-fatal at some point, and carry on
using the session; this is a legitimate use of the neon API but might
produce strange behaviour, since failing DNS lookups will be retried on
each request in the current implementation)

(BTW, can you CC suspected neon bugs to neon@webdav.org?)

Index: src/ne_request.c
===================================================================
RCS file: /home/cvs/neon/src/ne_request.c,v
retrieving revision 1.103
diff -u -r1.103 ne_request.c
--- src/ne_request.c 9 Sep 2002 21:27:43 -0000 1.103
+++ src/ne_request.c 9 Sep 2002 21:32:32 -0000
@@ -1134,6 +1134,8 @@
         ne_set_error(sess, _("Could not resolve hostname `%s': %s"),
                      info->hostname,
                      ne_addr_error(info->address, buf, sizeof buf));
+ ne_addr_destroy(info->address);
+ info->address = NULL;
         return NE_LOOKUP;
     } else {
         return NE_OK;
Index: test/request.c
===================================================================
RCS file: /home/cvs/neon/test/request.c,v
retrieving revision 1.76
diff -u -r1.76 request.c
--- test/request.c 25 Aug 2002 10:25:32 -0000 1.76
+++ test/request.c 9 Sep 2002 21:37:13 -0000
@@ -1216,6 +1216,17 @@
     return fail_noserver("no.such.domain", 7777, NE_LOOKUP);
 }
 
+/* neon <= 0.23.3: if a nameserver lookup failed, subsequent requests
+ * on the session would crash. */
+static int fail_double_lookup(void)
+{
+ ne_session *sess = ne_session_create("http", "nohost.example.com", 80);
+ any_request(sess, "/foo");
+ any_request(sess, "/bar");
+ ne_session_destroy(sess);
+ return OK;
+}
+
 static int fail_connect(void)
 {
     return fail_noserver("localhost", 7777, NE_CONNECT);
@@ -1388,6 +1399,7 @@
     T(fail_eof_headers),
     T(read_timeout),
     T(fail_lookup),
+ T(fail_double_lookup),
     T(fail_connect),
     T(proxy_no_resolve),
     T(fail_chunksize),

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Sep 9 23:50:25 2002

This is an archived mail posted to the Subversion Dev mailing list.