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

Re: "svn lock" crashes if editor exits without saving a lock message

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2005-04-08 22:26:11 CEST

On Fri, 8 Apr 2005, Philip Martin wrote:

> "Brian W. Fitzpatrick" <fitz@collab.net> writes:
>
> > On Apr 8, 2005, at 2:22 AM, Michael W Thelen wrote:
> >
> >> Both trunk and 1.2.0-rc1 clients will crash if you run "svn lock" with
> >> no log message, and exit the log message editor without saving. Below
> >> is the gdb stack trace on my machine (Debian unstable). Clearly a NULL
> >> comment parameter is being passed all the way through, but I'm not sure
> >> at which point it ought to be caught and the operation aborted.
> >
> > I'm unable to reproduce this with either emacs or vim (on Debian
> > testing)--which editor are you using?
>
> I can reproduce it, are you using ra_dav?
>
> The lock commit message handling is poor. First I get a blank editor
> window with no indication of which files are to be locked, there is

The files being locked are the ones specified on the command line. A
commit is different, since it will choose what files to commit for you.

> not even any indication that I should write a log message.
>
Same applies for propedit. I'm not sure what you want here.

> Next, if I exit the editor without writing a log message I don't get
> the "a)bort c)ontinue e)dit" message. Finally because lock uses it's
> own message code rather than the util.c code I don't get the bit of

That code is for getting commit messages. BTW, adding this loop in some
way was (is) on a to-do list, but it didn't happen before the 1.2 branch.

> code at subversion/clients/cmdline/util.c:607 that converts a NULL
> message into "". The NULL message causes ra_dav to SEGV.
>
libsvn_ra_dav violates its API. The comment is optional and may be NULL.
So, the bug is there. ra_local and ra_svn both accept a NULL pointer.

Regards,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 8 22:24:13 2005

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.