[Libreoffice-commits] core.git: include/unotools unotools/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Aug 13 20:16:03 UTC 2018
include/unotools/configmgr.hxx | 4 ++++
unotools/source/config/configmgr.cxx | 2 ++
2 files changed, 6 insertions(+)
New commits:
commit 9a26c243a8c81724b557355471818f7fe238ed64
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 13 16:22:30 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Aug 13 22:15:42 2018 +0200
short-circuit IsFuzzing when FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION defined
Change-Id: Ib82daad19185de3d271adee3cdb6d39a35e9c082
Reviewed-on: https://gerrit.libreoffice.org/58941
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/unotools/configmgr.hxx b/include/unotools/configmgr.hxx
index fd2dbb2455c2..5205c9d1664e 100644
--- a/include/unotools/configmgr.hxx
+++ b/include/unotools/configmgr.hxx
@@ -74,7 +74,11 @@ public:
// Avoid using the config layer and rely on defaults which is only useful
// for special test tool targets (typically fuzzing) where start-up speed
// is of the essence
+#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
+ static constexpr bool IsFuzzing() { return true; }
+#else
static bool IsFuzzing();
+#endif
static void EnableFuzzing();
private:
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx
index 664282e289d9..d07f6c164598 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -199,10 +199,12 @@ void utl::ConfigManager::doStoreConfigItems() {
static bool bIsFuzzing = false;
+#if !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
bool utl::ConfigManager::IsFuzzing()
{
return bIsFuzzing;
}
+#endif
void utl::ConfigManager::EnableFuzzing()
{
More information about the Libreoffice-commits
mailing list