зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1866462 - Avoid seqno desync with multiple trigger messages in fuzzing. r=truber
Depends on D194644 Differential Revision: https://phabricator.services.mozilla.com/D194645
This commit is contained in:
Родитель
e16e7f5f1a
Коммит
626cb3b019
|
@ -298,7 +298,7 @@ bool IPCFuzzController::ObserveIPCMessage(mozilla::ipc::NodeChannel* channel,
|
||||||
channel->mBlockSendRecv = true;
|
channel->mBlockSendRecv = true;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} else if (aMessage.type() == mIPCTriggerMsg) {
|
} else if (aMessage.type() == mIPCTriggerMsg && !Nyx::instance().started()) {
|
||||||
MOZ_FUZZING_NYX_PRINT("DEBUG: Ready message detected.\n");
|
MOZ_FUZZING_NYX_PRINT("DEBUG: Ready message detected.\n");
|
||||||
|
|
||||||
if (!haveTargetNodeName && !!getenv("MOZ_FUZZ_PROTOID_FILTER")) {
|
if (!haveTargetNodeName && !!getenv("MOZ_FUZZ_PROTOID_FILTER")) {
|
||||||
|
@ -332,22 +332,19 @@ bool IPCFuzzController::ObserveIPCMessage(mozilla::ipc::NodeChannel* channel,
|
||||||
|
|
||||||
// The ready message indicates the right node name for us to work with
|
// The ready message indicates the right node name for us to work with
|
||||||
// and we should only ever receive it once.
|
// and we should only ever receive it once.
|
||||||
if (haveTargetNodeName) {
|
if (!haveTargetNodeName) {
|
||||||
MOZ_FUZZING_NYX_PRINT("ERROR: Received ready signal twice?!\n");
|
targetNodeName = channel->GetName();
|
||||||
return false;
|
haveTargetNodeName = true;
|
||||||
|
|
||||||
|
// We can also use this message as the base template for other messages
|
||||||
|
if (!this->sampleHeader.initLengthUninitialized(
|
||||||
|
sizeof(IPC::Message::Header))) {
|
||||||
|
MOZ_FUZZING_NYX_ABORT("sampleHeader.initLengthUninitialized failed\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy(sampleHeader.begin(), aMessage.header(),
|
||||||
|
sizeof(IPC::Message::Header));
|
||||||
}
|
}
|
||||||
|
|
||||||
targetNodeName = channel->GetName();
|
|
||||||
haveTargetNodeName = true;
|
|
||||||
|
|
||||||
// We can also use this message as the base template for other messages
|
|
||||||
if (!this->sampleHeader.initLengthUninitialized(
|
|
||||||
sizeof(IPC::Message::Header))) {
|
|
||||||
MOZ_FUZZING_NYX_ABORT("sampleHeader.initLengthUninitialized failed\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
memcpy(sampleHeader.begin(), aMessage.header(),
|
|
||||||
sizeof(IPC::Message::Header));
|
|
||||||
} else if (haveTargetNodeName && targetNodeName != channel->GetName()) {
|
} else if (haveTargetNodeName && targetNodeName != channel->GetName()) {
|
||||||
// Not our node, no need to observe
|
// Not our node, no need to observe
|
||||||
return true;
|
return true;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче