You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by SteveKing <st...@gmx.ch> on 2003/02/10 17:25:21 UTC

crash in svn_client_commit()

Hi,

when calling the function svn_client_commit() with
the second parameter being an empty apr_array_header_t
(created with apr_array_make() and nothing added to it)
then subversion crashes.
Sure clients using this function should check if they're
passing an empty array or not but it's 'rude' of subversion
to crash instead of throwing an error.
I used revision 4753.

Stefan

Re: crash in svn_client_commit()

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
"SteveKing" <st...@gmx.ch> writes:
> here's the stacktrace of the crash I could reproduce (as I said before
> its revision 4753).
> 
> 
> 001B:004285EE TortoiseProc.exe, svn_categorize_props()+0222 byte(s)
> 001B:00428725 TortoiseProc.exe, svn_io_check_path()+0021 byte(s)
> 001B:0041858F TortoiseProc.exe, svn_wc_get_simple_wc_provider()+0431 byte(s)
> 001B:00418E35 TortoiseProc.exe, svn_wc_adm_probe_open()+0021 byte(s)
> 001B:0042590F TortoiseProc.exe, svn_wc_get_actual_target()+0031 byte(s)
> 001B:0042F9FE TortoiseProc.exe, svn_client_commit()+0110 byte(s)
> 001B:0040A84A TortoiseProc.exe, ProgressThread()+0931 byte(s)
> 
> hope that helps.

Yup -- fix coming up, thanks.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: crash in svn_client_commit()

Posted by SteveKing <st...@gmx.ch>.
>
> If you can trace the crash and provide a patch (it's probably pretty
> simple to fix), that would be great... let us know.

here's the stacktrace of the crash I could reproduce (as I said before
its revision 4753).


001B:004285EE TortoiseProc.exe, svn_categorize_props()+0222 byte(s)
001B:00428725 TortoiseProc.exe, svn_io_check_path()+0021 byte(s)
001B:0041858F TortoiseProc.exe, svn_wc_get_simple_wc_provider()+0431 byte(s)
001B:00418E35 TortoiseProc.exe, svn_wc_adm_probe_open()+0021 byte(s)
001B:0042590F TortoiseProc.exe, svn_wc_get_actual_target()+0031 byte(s)
001B:0042F9FE TortoiseProc.exe, svn_client_commit()+0110 byte(s)
001B:0040A84A TortoiseProc.exe, ProgressThread()+0931 byte(s)

hope that helps.

Stefan


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: crash in svn_client_commit()

Posted by SteveKing <st...@gmx.ch>.
> If you can trace the crash and provide a patch (it's probably pretty
> simple to fix), that would be great... let us know.

in revision 4818 it crashes in file libsvn_subr/io.c line 60:
function io_check_path(),
...
if (path[0] == '\0')        //crash here!
  path = ".";
...
 

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: crash in svn_client_commit()

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
"SteveKing" <st...@gmx.ch> writes:
> > How did you make this happen?  By running 'svn', or by writing new
> > code that uses the API?
> by writing a new client (TortoiseSVN). I had a function which first
> does something like svn st <folder> to get all the files which need
> to get commited, then show all those files in a dialog box where
> the user can select/deselect single files for the commit (sometimes
> it's usefull to split changes into several commits or to simply not
> commit some those changes which don't work right now). If the
> user deselects all the files (or if no file needs a commit) then my
> client crashed 'cause the second parameter to svn_client_commit()
> was an empty array.
>
> I fixed it now by checking first before calling svn_client_commit()
> though it has no priority to get 'fixed' in subversion.

If you can trace the crash and provide a patch (it's probably pretty
simple to fix), that would be great... let us know.

-K


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: crash in svn_client_commit()

Posted by SteveKing <st...@gmx.ch>.
> "SteveKing" <st...@gmx.ch> writes:
> > when calling the function svn_client_commit() with
> > the second parameter being an empty apr_array_header_t
> > (created with apr_array_make() and nothing added to it)
> > then subversion crashes.
> > Sure clients using this function should check if they're
> > passing an empty array or not but it's 'rude' of subversion
> > to crash instead of throwing an error.
> > I used revision 4753.
> 
> How did you make this happen?  By running 'svn', or by writing new
> code that uses the API?
by writing a new client (TortoiseSVN). I had a function which first
does something like svn st <folder> to get all the files which need
to get commited, then show all those files in a dialog box where
the user can select/deselect single files for the commit (sometimes
it's usefull to split changes into several commits or to simply not
commit some those changes which don't work right now). If the
user deselects all the files (or if no file needs a commit) then my
client crashed 'cause the second parameter to svn_client_commit()
was an empty array.
I fixed it now by checking first before calling svn_client_commit()
though it has no priority to get 'fixed' in subversion.

Stefan


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: crash in svn_client_commit()

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
"SteveKing" <st...@gmx.ch> writes:
> when calling the function svn_client_commit() with
> the second parameter being an empty apr_array_header_t
> (created with apr_array_make() and nothing added to it)
> then subversion crashes.
> Sure clients using this function should check if they're
> passing an empty array or not but it's 'rude' of subversion
> to crash instead of throwing an error.
> I used revision 4753.

How did you make this happen?  By running 'svn', or by writing new
code that uses the API?

(Agree it's not ideal behavior, just curious about the reproduction
recipe :-) ).

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org