summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-01-30 09:43:34 -0500
committerNick Mathewson <nickm@torproject.org>2020-01-30 09:43:34 -0500
commit2a1f8ea2e78486966c71762ebc3286f2b3e531ff (patch)
treebba6ec08d970e2305e38ced3503b0affe3c813b6
parentec7f99e6ef23f05d8fea4b8b63cc4f5ecc92eb33 (diff)
downloadtor-2a1f8ea2e78486966c71762ebc3286f2b3e531ff.tar.gz
tor-2a1f8ea2e78486966c71762ebc3286f2b3e531ff.zip
Do not set "once" when calling tor_bug_occurred_ from BUG().
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.
-rw-r--r--changes/bug33095_0415
-rw-r--r--src/lib/log/util_bug.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/changes/bug33095_041 b/changes/bug33095_041
new file mode 100644
index 0000000000..7d1f04e279
--- /dev/null
+++ b/changes/bug33095_041
@@ -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.
diff --git a/src/lib/log/util_bug.h b/src/lib/log/util_bug.h
index 546ae1e3ef..f67c1e995f 100644
--- a/src/lib/log/util_bug.h
+++ b/src/lib/log/util_bug.h
@@ -196,7 +196,7 @@
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) || ... */