On Tue, Sep 03, 2013 at 06:06:46PM +0200, Matthias Vorwerk wrote:
>
> I encountered the same problem with subversion-1.8.3
> (CentOS5, httpd-2.4.6):
> svn merge ends with sengmentation fault.
>
> I re-compiled svn with the --enable-maintainer-mode configure option.
>
> Here is what I get:
> ---------------------------------
> % libtool --mode=execute gdb --args /opt/local/bin/bin/svn merge
> --non-interactive --dry-run http://reposrv/p1/branches/branch1/work .
> /usr/bin/libtool: line 6823: LC_ALL: command not found
> /usr/bin/libtool: line 6823: LC_CTYPE: command not found
> /usr/bin/libtool: line 6823: LC_COLLATE: command not found
> /usr/bin/libtool: line 6823: LC_MESSAGES: command not found
> GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-37.el5)
> Copyright (C) 2009 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-redhat-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> Reading symbols from /opt/local/bin/bin/svn...done.
> (gdb) r
> Starting program: /opt/local/bin/bin/svn merge --non-interactive --dry-run
> http://reposrv/p1/branches/branch1/work .
> [Thread debugging using libthread_db enabled]
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00002aaaaab0e2db in filter_log_entry_with_rangelist
> (baton=0x7fffffff9530, log_entry=0x9c2510, pool=0x9c2498)
> at subversion/libsvn_client/mergeinfo.c:1399
> 1399 svn_merge_range_t *youngest_range = APR_ARRAY_IDX(
> (gdb)
Can you show us what these gdb commands print here, please?
bt
p ancestor_is_self
p nearest_ancestor_mergeinfo
p rangelist
Thanks!
And then, please try this. It's a shot in the dark. There is an obvious
bug where the code doesn't check for nearest_ancestor_mergeinfo being
NULL even though it could be. I threw in a NULL check for rangelist
for good measure, apparently that's what you're hitting?
Index: subversion/libsvn_client/mergeinfo.c
===================================================================
--- subversion/libsvn_client/mergeinfo.c (revision 1519009)
+++ subversion/libsvn_client/mergeinfo.c (working copy)
@@ -1405,17 +1405,21 @@ filter_log_entry_with_rangelist(void *baton,
obviously back. If it was added or replaced it's still around
possibly it was replaced one or more times, but it's back now.
Regardless, LOG_ENTRY->REVISION is *not* an eligible revision! */
- if (ancestor_is_self /* Explicit mergeinfo on TARGET_PATH_AFFECTED */
+ if (nearest_ancestor_mergeinfo &&
+ ancestor_is_self /* Explicit mergeinfo on TARGET_PATH_AFFECTED */
&& (change->action != 'M'))
{
svn_rangelist_t *rangelist =
svn_hash_gets(nearest_ancestor_mergeinfo, path);
- svn_merge_range_t *youngest_range = APR_ARRAY_IDX(
- rangelist, rangelist->nelts - 1, svn_merge_range_t *);
+ if (rangelist)
+ {
+ svn_merge_range_t *youngest_range = APR_ARRAY_IDX(
+ rangelist, rangelist->nelts - 1, svn_merge_range_t *);
- if (youngest_range
- && (youngest_range->end > log_entry->revision))
- continue;
+ if (youngest_range
+ && (youngest_range->end > log_entry->revision))
+ continue;
+ }
}
if (nearest_ancestor_mergeinfo)
Received on 2013-09-03 18:39:41 CEST