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

Crash in calculate_repos_relpath()

From: Ivan Zhakov <ivan_at_visualsvn.com>
Date: Wed, 9 Sep 2015 18:23:07 +0300

I was looking to the most reported TortoiseSVN crash reports and found
many crash in libsvn_wc/update_editor.c:551 in function
calculate_repos_relpath() due calling to svn_relpath_join() with BASE
== NULL:
[[[
      if (old_repos_relpath == NULL)
        {
          SVN_ERR_ASSERT(pb != NULL);
          *new_repos_relpath = svn_relpath_join(pb->new_repos_relpath, name,
                                                result_pool);
        }
]]]

Full stack trace:
     libsvn_tsvn32.dll!svn_relpath_join(const char * base, const char
* component, apr_pool_t * pool) Line 1175 C
> libsvn_tsvn32.dll!calculate_repos_relpath(const char * * new_repos_relpath, const char * local_abspath, const char * old_repos_relpath, edit_baton * eb, dir_baton * pb, apr_pool_t * result_pool, apr_pool_t *) Line 551 C
     libsvn_tsvn32.dll!add_file(const char * path, void *
parent_baton, const char * copyfrom_path, long copyfrom_rev,
apr_pool_t * pool, void * * file_baton) Line 3069 C
     libsvn_tsvn32.dll!add_file(const char * path, void *
parent_baton, const char * copyfrom_path, long copyfrom_revision,
apr_pool_t * pool, void * * file_baton) Line 167 C
     libsvn_tsvn32.dll!ensure_file_opened(file_baton_t * file,
apr_pool_t * scratch_pool) Line 915 C
     libsvn_tsvn32.dll!update_closed(svn_ra_serf__xml_estate_t * xes,
void * baton, int leaving_state, const svn_string_t * cdata,
apr_hash_t * attrs, apr_pool_t * scratch_pool) Line 1902 C
     libsvn_tsvn32.dll!xml_cb_end(svn_ra_serf__xml_context_t * xmlctx,
const char *) Line 832 C
     libsvn_tsvn32.dll!expat_end(void * userData, const char *
raw_name) Line 965 C

I've full dump with all process memory, so local variables contain real values.

I see the following relevant changes in calculate_repos_relpath():
[[[
Author: rhuijben
Date: Sun Dec 15 00:41:10 2013
New Revision: 1550988

URL: http://svn.apache.org/r1550988
Log:
Following up on r1550986 and r1550985, update arguments of the repos relpath
calculation function to avoid a db query for every normal node touched
during update.
]]

[[[
Author: rhuijben
Date: Mon Mar 31 10:58:19 2014
New Revision: 1583294

URL: http://svn.apache.org/r1583294
Log:
Make the add_directory and add_file code in the update editor more similar and
thereby avoid a few unneeded db operations during a clean checkout.
]]]

Bert, do you have any ideas why PB->NEW_REPOS_RELPATH could be NULL?

-- 
Ivan Zhakov
Received on 2015-09-09 17:23:32 CEST

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

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