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

Re: svn_error_abort_on_malfunction doesn't

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 15 Jan 2009 00:35:58 +0000

David Glasser wrote:
> svn_error_abort_on_malfunction claims to abort when triggered, but it
> actually ends up doing an exit() instead. Which means it won't
> trigger a break in gdb. Bah.
>
> Do people agree that this is wrong and should be fixed before 1.6?

Yes it's wrong. (At least the default implementation is. Obviously
individuals and packagers are free to replace it with an implementation
that does something different.)

"Should" be fixed before 1.6 - yes - but it's not a "must", in the sense
that it's not an API change or a guaranteed behaviour.

Is this the fix?

[[[
* subversion/libsvn_subr/error.c
  (svn_error_abort_on_malfunction): Actually abort after displaying
    the error.

--This line, and those below, will be ignored--

Index: subversion/libsvn_subr/error.c
===================================================================
--- subversion/libsvn_subr/error.c (revision 35256)
+++ subversion/libsvn_subr/error.c (working copy)
@@ -520,7 +520,8 @@ svn_error_abort_on_malfunction(svn_boole
 {
   svn_error_t *err = svn_error_raise_on_malfunction(TRUE, file, line, expr);

- svn_handle_error2(err, stderr, TRUE, "svn: ");
+ svn_handle_error2(err, stderr, FALSE, "svn: ");
+ abort();
   return err; /* Not reached. */
 }

]]]

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1025375
Received on 2009-01-15 01:36:28 CET

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.