Re: svn commit: r1935991 - in subversion/branches/1.15.x: . subversion/libsvn_client

Branko Čibej <[email protected]>
Newsgroups gmane.comp.version-control.subversion.devel
Organization The Apache Software Foundation
Message-ID <[email protected]>
On 8. 7. 2026 06:00, [email protected] wrote:
> Author: svn-role
> Date: Wed Jul  8 04:00:41 2026
> New Revision: 1935991
>
> Log:
> Merge the r1934787 group from trunk:
>
>   * r1934787, r1934811
>     Fix potential use of uninitialized memory in the conflict resolver.
>     Justification:
>       Subversion should try to not crash.
>     Votes:
>       +1: brane, ivan, kotkov
>
> Modified:
>     subversion/branches/1.15.x/   (props changed)
>     subversion/branches/1.15.x/STATUS
>     subversion/branches/1.15.x/subversion/libsvn_client/conflicts.c


I realise now that I made a mistake here: we're not supposed to leave 
SVN_DBG() macros in trunk code, they're intended only for developer 
testing. It's not a showstopper for 1.15.0, can be fixed on trunk and 
trivially back-ported after the release.

I was distracted by the fact that SVN_ERR_MALFUNCTION() gives no 
indication of the reason for an abort.

-- Brane



> Modified: subversion/branches/1.15.x/STATUS
> ==============================================================================
> --- subversion/branches/1.15.x/STATUS	Wed Jul  8 04:00:32 2026	(r1935990)
> +++ subversion/branches/1.15.x/STATUS	Wed Jul  8 04:00:41 2026	(r1935991)
> @@ -66,10 +66,3 @@ Veto-blocked changes:
>   
>   Approved changes:
>   =================
> -
> - * r1934787, r1934811
> -   Fix potential use of uninitialized memory in the conflict resolver.
> -   Justification:
> -     Subversion should try to not crash.
> -   Votes:
> -     +1: brane, ivan, kotkov
>
> Modified: subversion/branches/1.15.x/subversion/libsvn_client/conflicts.c
> ==============================================================================
> --- subversion/branches/1.15.x/subversion/libsvn_client/conflicts.c	Wed Jul  8 04:00:32 2026	(r1935990)
> +++ subversion/branches/1.15.x/subversion/libsvn_client/conflicts.c	Wed Jul  8 04:00:41 2026	(r1935991)
> @@ -40,6 +40,7 @@
>   #include "svn_subst.h"
>   #include "client.h"
>   
> +#include "private/svn_debug.h"
>   #include "private/svn_diff_tree.h"
>   #include "private/svn_ra_private.h"
>   #include "private/svn_sorts_private.h"
> @@ -4862,7 +4863,7 @@ conflict_tree_get_description_incoming_d
>                        new_repos_relpath, new_rev, result_pool);
>   
>           }
> -      }
> +    }
>     else if (conflict_operation == svn_wc_operation_merge)
>       {
>         if (details->deleted_rev != SVN_INVALID_REVNUM)
> @@ -4883,7 +4884,14 @@ conflict_tree_get_description_incoming_d
>                        details, victim_node_kind, old_repos_relpath, old_rev,
>                        new_repos_relpath, new_rev, result_pool);
>           }
> -      }
> +    }
> +  else
> +    {
> +#ifdef SVN_DEBUG
> +      SVN_DBG(("unknown conflict operation: %d", (int)conflict_operation));
> +#endif
> +      SVN_ERR_MALFUNCTION();
> +    }
>   
>     *incoming_change_description = apr_pstrdup(result_pool, action);
>   
> @@ -5838,6 +5846,13 @@ conflict_tree_get_description_incoming_a
>                      details, new_node_kind, old_repos_relpath,
>                      old_rev, new_rev, result_pool);
>       }
> +  else
> +    {
> +#ifdef SVN_DEBUG
> +      SVN_DBG(("unknown conflict operation: %d", (int)conflict_operation));
> +#endif
> +      SVN_ERR_MALFUNCTION();
> +    }
>   
>     *incoming_change_description = apr_pstrdup(result_pool, action);
>   
> @@ -5984,7 +5999,7 @@ conflict_tree_get_details_incoming_edit(
>     svn_revnum_t new_rev;
>     svn_node_kind_t old_node_kind;
>     svn_node_kind_t new_node_kind;
> -  svn_wc_operation_t operation;
> +  svn_wc_operation_t conflict_operation;
>     const char *url;
>     const char *corrected_url;
>     svn_ra_session_t *ra_session;
> @@ -6001,8 +6016,8 @@ conflict_tree_get_details_incoming_edit(
>     SVN_ERR(svn_client_conflict_get_repos_info(&repos_root_url, NULL,
>                                                conflict,
>                                                scratch_pool, scratch_pool));
> -  operation = svn_client_conflict_get_operation(conflict);
> -  if (operation == svn_wc_operation_update)
> +  conflict_operation = svn_client_conflict_get_operation(conflict);
> +  if (conflict_operation == svn_wc_operation_update)
>       {
>         b.node_kind = old_rev < new_rev ? new_node_kind : old_node_kind;
>   
> @@ -6018,8 +6033,8 @@ conflict_tree_get_details_incoming_edit(
>         b.repos_relpath = old_rev < new_rev ? new_repos_relpath
>                                             : old_repos_relpath;
>       }
> -  else if (operation == svn_wc_operation_switch ||
> -           operation == svn_wc_operation_merge)
> +  else if (conflict_operation == svn_wc_operation_switch ||
> +           conflict_operation == svn_wc_operation_merge)
>       {
>         url = svn_path_url_add_component2(repos_root_url, new_repos_relpath,
>                                           scratch_pool);
> @@ -6027,6 +6042,13 @@ conflict_tree_get_details_incoming_edit(
>         b.repos_relpath = new_repos_relpath;
>         b.node_kind = new_node_kind;
>       }
> +  else
> +    {
> +#ifdef SVN_DEBUG
> +      SVN_DBG(("unknown conflict operation: %d", (int)conflict_operation));
> +#endif
> +      SVN_ERR_MALFUNCTION();
> +    }
>   
>     SVN_ERR(svn_client__open_ra_session_internal(&ra_session,
>                                                  &corrected_url,
> @@ -6363,6 +6385,13 @@ conflict_tree_get_description_incoming_e
>               }
>           }
>       }
> +  else
> +    {
> +#ifdef SVN_DEBUG
> +      SVN_DBG(("unknown conflict operation: %d", (int)conflict_operation));
> +#endif
> +      SVN_ERR_MALFUNCTION();
> +    }
>   
>     action = apr_psprintf(scratch_pool, "%s:\n%s", action,
>                           describe_incoming_edit_list_modified_revs(
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.