]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Do not set "once" when calling tor_bug_occurred_ from BUG().
authorNick Mathewson <nickm@torproject.org>
Thu, 30 Jan 2020 14:43:34 +0000 (09:43 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 30 Jan 2020 14:43:34 +0000 (09:43 -0500)
The "once" flag makes tor_bug_occurred_() say that future instances
of the warning will be suppressed -- but that's not something that
BUG() does.  Fixes bug 33095; bugfix on 0.4.1.1-alpha.

changes/bug33095_041 [new file with mode: 0644]
src/lib/log/util_bug.h

diff --git a/changes/bug33095_041 b/changes/bug33095_041
new file mode 100644 (file)
index 0000000..7d1f04e
--- /dev/null
@@ -0,0 +1,5 @@
+  o Minor bugfixes (logging, bug reporting):
+    - When logging a bug, do not say "Future instances of this warning
+      will be silenced" unless we are actually going to do
+      so. Previously we would say this whenever a BUG() check failed in
+      the code.  Fixes bug 33095; bugfix on 0.4.1.1-alpha.
index 546ae1e3ef127c32f5b866c9b4e6187a8c748faf..f67c1e995f9ee8404edc1e1f2c65d9c4de3a0751 100644 (file)
   STMT_END
 #define BUG(cond)                                                       \
   (ASSERT_PREDICT_UNLIKELY_(cond) ?                                     \
-  (tor_bug_occurred_(SHORT_FILE__,__LINE__,__func__,"!("#cond")",1,NULL),1) \
+  (tor_bug_occurred_(SHORT_FILE__,__LINE__,__func__,"!("#cond")",0,NULL),1) \
    : 0)
 #endif /* defined(ALL_BUGS_ARE_FATAL) || ... */