aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-06-29 13:48:32 -0400
committerNick Mathewson <nickm@torproject.org>2020-06-29 13:48:32 -0400
commit64b8ee3f9e0f2c70444f2aee0acf1433a791d82d (patch)
tree4eb4ae99bdec26cc5c7909df41ab55fbbb17887a
parent57390b76bf0a4dea8254f53df734cb1427ed3006 (diff)
parent0575a182a633429e755dc4366eced76656461d9b (diff)
downloadtor-64b8ee3f9e0f2c70444f2aee0acf1433a791d82d.tar.gz
tor-64b8ee3f9e0f2c70444f2aee0acf1433a791d82d.zip
Merge branch 'maint-0.4.2' into release-0.4.2
-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 030bfa2cc9..7eaa6173c8 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) || ... */