You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stefan Küng <to...@gmail.com> on 2008/07/13 08:39:41 UTC
[PATCH] fix crash when merging
Hi,
I've received many crash reports for TSVN which indicated a problem when
merging. But the data from the crash dump was not very helpful so it
took me a while to figure out the problem:
In subversion/libsvn_wc/props.c, function get_existing_prop_reject_file
the call to apr_pstrcat() is not correct: as the docs for apr_pstrcat
indicate, the last parameter must be NULL.
The attached patch fixes this problem.
I vote for backporting this to 1.5.x.
(I know my vote doesn't really count :) )
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
Re: [PATCH] fix crash when merging
Posted by Stefan Sperling <st...@elego.de>.
On Sun, Jul 13, 2008 at 11:26:53AM +0200, Stefan Küng wrote:
> Stefan Sperling wrote:
> > On Sun, Jul 13, 2008 at 10:39:41AM +0200, Stefan Küng wrote:
> >> Index: subversion/libsvn_wc/props.c
> >> ===================================================================
> >> --- subversion/libsvn_wc/props.c (revision 32079)
> >> +++ subversion/libsvn_wc/props.c (working copy)
> >> @@ -212,7 +212,8 @@
> >> SVN_ERR(svn_wc__entry_versioned(&entry, path, adm_access, FALSE, pool));
> >>
> >> *reject_file = entry->prejfile
> >> - ? apr_pstrcat(pool, svn_wc_adm_access_path(adm_access), entry->prejfile)
> >> + ? apr_pstrcat(pool, svn_wc_adm_access_path(adm_access),
> >> + entry->prejfile, NULL)
> >
> > Such are the caveats of varargs. Applied in r32080
> > and nominated for backport in r32081.
>
> Thanks!
For the record, I've also grepped our entire tree for calls to
apr_pstrcat and looked at all of them. Turns out we made this
error only in the instance you just fixed.
Stefan
Re: [PATCH] fix crash when merging
Posted by Stefan Küng <to...@gmail.com>.
Stefan Sperling wrote:
> On Sun, Jul 13, 2008 at 10:39:41AM +0200, Stefan Küng wrote:
>> Hi,
>>
>> I've received many crash reports for TSVN which indicated a problem when
>> merging. But the data from the crash dump was not very helpful so it
>> took me a while to figure out the problem:
>>
>> In subversion/libsvn_wc/props.c, function get_existing_prop_reject_file
>> the call to apr_pstrcat() is not correct: as the docs for apr_pstrcat
>> indicate, the last parameter must be NULL.
>>
>> The attached patch fixes this problem.
>>
>> I vote for backporting this to 1.5.x.
>> (I know my vote doesn't really count :) )
>>
>> Stefan
>>
>> --
>> ___
>> oo // \\ "De Chelonian Mobile"
>> (_,\/ \_/ \ TortoiseSVN
>> \ \_/_\_/> The coolest Interface to (Sub)Version Control
>> /_/ \_\ http://tortoisesvn.net
>
>> [[[
>> * subversion/libsvn_wc/props.c
>> (get_existing_prop_reject_file): the last parameter for apr_pstrcat
>> must be NULL.
>> ]]]
>> Index: subversion/libsvn_wc/props.c
>> ===================================================================
>> --- subversion/libsvn_wc/props.c (revision 32079)
>> +++ subversion/libsvn_wc/props.c (working copy)
>> @@ -212,7 +212,8 @@
>> SVN_ERR(svn_wc__entry_versioned(&entry, path, adm_access, FALSE, pool));
>>
>> *reject_file = entry->prejfile
>> - ? apr_pstrcat(pool, svn_wc_adm_access_path(adm_access), entry->prejfile)
>> + ? apr_pstrcat(pool, svn_wc_adm_access_path(adm_access),
>> + entry->prejfile, NULL)
>
> Such are the caveats of varargs. Applied in r32080
> and nominated for backport in r32081.
Thanks!
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
Re: [PATCH] fix crash when merging
Posted by Stefan Sperling <st...@elego.de>.
On Sun, Jul 13, 2008 at 10:39:41AM +0200, Stefan Küng wrote:
> Hi,
>
> I've received many crash reports for TSVN which indicated a problem when
> merging. But the data from the crash dump was not very helpful so it
> took me a while to figure out the problem:
>
> In subversion/libsvn_wc/props.c, function get_existing_prop_reject_file
> the call to apr_pstrcat() is not correct: as the docs for apr_pstrcat
> indicate, the last parameter must be NULL.
>
> The attached patch fixes this problem.
>
> I vote for backporting this to 1.5.x.
> (I know my vote doesn't really count :) )
>
> Stefan
>
> --
> ___
> oo // \\ "De Chelonian Mobile"
> (_,\/ \_/ \ TortoiseSVN
> \ \_/_\_/> The coolest Interface to (Sub)Version Control
> /_/ \_\ http://tortoisesvn.net
> [[[
> * subversion/libsvn_wc/props.c
> (get_existing_prop_reject_file): the last parameter for apr_pstrcat
> must be NULL.
> ]]]
> Index: subversion/libsvn_wc/props.c
> ===================================================================
> --- subversion/libsvn_wc/props.c (revision 32079)
> +++ subversion/libsvn_wc/props.c (working copy)
> @@ -212,7 +212,8 @@
> SVN_ERR(svn_wc__entry_versioned(&entry, path, adm_access, FALSE, pool));
>
> *reject_file = entry->prejfile
> - ? apr_pstrcat(pool, svn_wc_adm_access_path(adm_access), entry->prejfile)
> + ? apr_pstrcat(pool, svn_wc_adm_access_path(adm_access),
> + entry->prejfile, NULL)
Such are the caveats of varargs. Applied in r32080
and nominated for backport in r32081.
Thanks,
Stefan