From c9f96864deceec61787bcf3d31e77799a68631b9 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 5 Apr 2018 15:47:34 -0400 Subject: [PATCH] Bug 1451859 - Part 3: In FUZZER builds, do not crash on malfored IPC messages. r=jld, r=posidron --- dom/ipc/ContentParent.cpp | 2 ++ ipc/glue/ProtocolUtils.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index b810f607da99..734a9b5b6987 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -1560,8 +1560,10 @@ ContentParent::ProcessingError(Result aCode, const char* aReason) if (MsgDropped == aCode) { return; } +#ifndef FUZZING // Other errors are big deals. KillHard(aReason); +#endif } /* static */ diff --git a/ipc/glue/ProtocolUtils.cpp b/ipc/glue/ProtocolUtils.cpp index 9e979c13d536..9400e0d35db6 100644 --- a/ipc/glue/ProtocolUtils.cpp +++ b/ipc/glue/ProtocolUtils.cpp @@ -311,7 +311,9 @@ LogicError(const char* aMsg) void ActorIdReadError(const char* aActorDescription) { +#ifndef FUZZING MOZ_CRASH_UNSAFE_PRINTF("Error deserializing id for %s", aActorDescription); +#endif } void