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

Bogus HOME causes segfault

From: Trent Fisher <trent.fisher_at_oracle.com>
Date: Mon, 28 Apr 2014 13:19:03 -0400

I know this probably falls into the "Doctor, it hurts when I do this"
category, but I found a probable bug in Subversion 1.8.5 where an
invalid HOME directory results in a segfault. For example:

$ HOME=/dev/null svn --version
svn: warning: W000020: Can't open file '/dev/null/.subversion/servers':
Not a directory
Segmentation fault (core dumped)

This does not happen with versions 1.7.8 or 1.6.16 (the other two I had
handy). On those, it gives me the same warning, but does not segfault.
I have yet to try 1.8.8 as I don't have it installed anywhere yet. This
also happens with an unreadable directory (i.e. /root), but it does not
happen if given a nonexistent directory (i.e. "/foo/bar")

Why do I care? The php script with repos-web does an svn log, and the
HOME environment variable ends up containing "/root" which is not
readable to the repository owner. I have implemented a workaround, but
it seems to me that a segfault is never a good answer, even if I am
doing something stupid :)

++thanks,
trent...
Received on 2014-04-28 19:20:00 CEST

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

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