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

RE: r761: Could not read status line (New Info)

From: Jay Freeman \(saurik\) <saurik_at_saurik.com>
Date: 2002-01-10 06:49:41 CET

Ben:

OK, I did an update just now, and noticed that someone added the code to
set value to NULL. Unfortunately, later code doesn't want to jive.
First, there's that "assert: value != NULL" comment that should worry
SOMEONE :).

The later code is doing checks based on *value == '\0', and is using
sprintf() on the result even if there isn't one (which would generate a
nasty "(null)" in the output)... this code seems like it would be
happier if value were set to "" rather than NULL. To point out, I tried
changing the current code from value = NULL to value = "" and it
at least _seems_ to work now.

[root(4)@dreadnought bin]# gdb httpd
GNU gdb Red Hat Linux (5.1-2)
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run -X
Starting program: /usr/local/apache2/bin/httpd -X
[New Thread 1024 (LWP 30061)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 30061)]
0x40048109 in dav_svn_insert_prop (resource=0xbfffeb74, propid=20026,
what=DAV_PROP_INSERT_VALUE, phdr=0xbfffea70)
    at subversion/mod_dav_svn/liveprops.c:360
360 if (what == DAV_PROP_INSERT_NAME
(gdb) list
355 /* get the information and global NS index for the property */
356 global_ns = dav_get_liveprop_info(propid,
&dav_svn_liveprop_group, &info);
357
358 /* assert: info != NULL && info->name != NULL */
359
360 if (what == DAV_PROP_INSERT_NAME
361 || (what == DAV_PROP_INSERT_VALUE && *value == '\0')) {
362 s = apr_psprintf(p, "<lp%d:%s/>" DEBUG_CR, global_ns,
info->name);
363 }
364 else if (what == DAV_PROP_INSERT_VALUE) {
(gdb) print value
$1 = 0x0
(gdb)

Sincerely,
Jay Freeman (saurik)
saurik@saurik.com

-----Original Message-----
From: sussman@collab.net [mailto:sussman@collab.net]
Sent: Wednesday, January 09, 2002 10:40 AM
To: Jay Freeman (saurik)
Cc: svn-dev
Subject: Re: r761: Could not read status line (New Info)

"Jay Freeman \(saurik\)" <saurik@saurik.com> writes:

> 189 value = apr_xml_quote_string(p, last_author->data, 1);
> (gdb) print last_author
> $1 = (struct {...} *) 0x0
> (gdb) list
> 184 /* ### what to do? */
> 185 value = "###error###";
> 186 break;
> 187 }
> 188
> 189 value = apr_xml_quote_string(p, last_author->data, 1);
> 190 break;

Thanks, Jay. I see the problem.

Greg, if the client explicitly requests a creator-displayname
property, and the fs returns a NULL value, what should
dav_svn_insert_prop do? Just set 'value' to NULL as well?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:55 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.