[prev in list] [next in list] [prev in thread] [next in thread]
List: subversion-dev
Subject: Re: New canonicalization functions [was: Subversion Exception!]
From: Branko_Čibej <brane () apache ! org>
Date: 2018-12-15 12:23:49
Message-ID: ef5e9dbf-07d8-0eed-ddd9-35c1b8a7c8c0 () apache ! org
[Download RAW message or body]
On 15.12.2018 12:24, Branko Čibej wrote:
> On 14.12.2018 19:05, Branko Čibej wrote:
>> On Fri, 14 Dec 2018, 18:14 Julian Foad <julianfoad@apache.org wrote:
>>
>>> Julian Foad wrote:
>>>> Are you willing to add random-input testing for them?
>>> The attached patch 'dirent-uri-test-random-2.patch' tests rules like:
>>>
>>> * every result should pass an X_is_canonical() test (obvious by code
>>> inspection);
>>> * every other input should produce SVN_ERR_CANONICALIZATION_FAILED;
>>> * when a path is "canonical", it should be unchanged by "canonicalize".
>>>
>>> Some findings:
>>>
>>> * svn_uri_canonicalize_safe("") aborts;
>>> * svn_uri_canonicalize_safe("/foo") aborts;
>>>
>> We can fix this in the private "canonicalize()" function that all these
>> eventually call. As before, I didn't have time to unknit the internal
>> implementation.
>
> I saw a funny thing in that function the other day ...
>
> if (SVN_PATH_IS_EMPTY(path))
> {
> assert(type != type_uri);
> return "";
> }
r1848990. There were two assertions in that function.
Note that we'll also have to create "safe" versions of the
_internal_style() functions, because those pass their result through
their _canonicalize() colleagues.
-- Brane
P.S.: Replacing all assertions in libsvn_subr/dirent_uri.c will cause
code churn of awseome proportions.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic