You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Osku Salerma <sa...@cc.helsinki.fi> on 2003/11/06 12:53:42 UTC
'svn st' segfaults
How to make subversion 0.32.1 crash:
cd <random workspace>
touch <random versioned file>
chmod 0 <same random versioned file>
svn st
Segmentation fault
strace gives:
...
stat64(".svn/text-base/fooblaa.txt.svn-base", {st_mode=S_IFREG|0444,
st_size=0, ...}) = 0
open("fooblaa.txt", O_RDONLY) = -1 EACCES (Permission
denied)
--- SIGSEGV (Segmentation fault) ---
and the backtrace is:
(gdb) bt
#0 0x40169470 in svn_error_compose () from
/usr/lib/libsvn_subr-1.so.0
#1 0x4004959f in svn_wc__versioned_file_modcheck ()
from /usr/lib/libsvn_wc-1.so.0
#2 0x400496c6 in svn_wc_text_modified_p () from
/usr/lib/libsvn_wc-1.so.0
#3 0x4004a158 in assemble_status () from /usr/lib/libsvn_wc-1.so.0
#4 0x4004a312 in send_status_structure () from
/usr/lib/libsvn_wc-1.so.0
#5 0x4004a65b in handle_dir_entry () from /usr/lib/libsvn_wc-1.so.0
#6 0x4004abfc in get_dir_status () from /usr/lib/libsvn_wc-1.so.0
#7 0x4004be28 in close_edit () from /usr/lib/libsvn_wc-1.so.0
#8 0x4015aae6 in close_edit () from /usr/lib/libsvn_delta-1.so.0
#9 0x4002b277 in svn_client_status () from
/usr/lib/libsvn_client-1.so.0
#10 0x08051ef1 in svn_cl__status ()
#11 0x0804ec7f in main ()
#12 0x4042f4ed in __libc_start_main () from /lib/libc.so.6
This is on Linux, btw.
I assume it's a simple error of some code not handling EACCES
correctly, but if you can't reproduce the error I can investigate it
further.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn st' segfaults
Posted by Jani Averbach <ja...@cc.jyu.fi>.
On 2003-11-06 14:53+0200, Osku Salerma wrote:
> How to make subversion 0.32.1 crash:
>
> cd <random workspace>
> touch <random versioned file>
> chmod 0 <same random versioned file>
> svn st
> Segmentation fault
>
I confirm: however svn st doesn't segfault but svn diff will.
BR, Jani
--
Jani Averbach
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn st' segfaults
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Nov 6, 2003, at 8:43 AM, Garrett Rooney wrote:
> * subversion/libsvn_wc/questions.c
> (svn_wc__versioned_file_modcheck): don't compose a NULL error.
>
> Index: subversion/libsvn_wc/questions.c
> ===================================================================
> --- subversion/libsvn_wc/questions.c (revision 7646)
> +++ subversion/libsvn_wc/questions.c (working copy)
> @@ -220,7 +220,8 @@
>
> if (err)
> {
> - svn_error_compose (err, err2);
> + if (err2)
> + svn_error_compose (err, err2);
> return err;
> }
I just committed this change in revision 7662.
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn st' segfaults
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Nov 6, 2003, at 7:53 AM, Osku Salerma wrote:
> How to make subversion 0.32.1 crash:
>
> cd <random workspace>
> touch <random versioned file>
> chmod 0 <same random versioned file>
> svn st
> Segmentation fault
Actually, we were trying to compose two errors together when one of the
was NULL... Note that I can't make the error occur in my svn working
copy, but in my serf working copy it does happen. I suspect it's
related to EOL conversion or keyword substitution or something. Here's
a patch that fixes the problem. If someone wants to glance at it, run
it through make check, and maybe commit, feel free. I'm late for work
already ;-)
-garrett
* subversion/libsvn_wc/questions.c
(svn_wc__versioned_file_modcheck): don't compose a NULL error.
Index: subversion/libsvn_wc/questions.c
===================================================================
--- subversion/libsvn_wc/questions.c (revision 7646)
+++ subversion/libsvn_wc/questions.c (working copy)
@@ -220,7 +220,8 @@
if (err)
{
- svn_error_compose (err, err2);
+ if (err2)
+ svn_error_compose (err, err2);
return err;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org