зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1864487 - Improve the decision debug message in IPC fuzzing. r=truber
Depends on D193451 Differential Revision: https://phabricator.services.mozilla.com/D193452
This commit is contained in:
Родитель
bec852555c
Коммит
28a1a00a47
|
@ -229,6 +229,7 @@ void IPCFuzzController::AddToplevelActor(PortName name, ProtocolId protocolId) {
|
|||
}
|
||||
uint8_t portIndex = result->second;
|
||||
portNames[portIndex].push_back(name);
|
||||
portNameToProtocolName[name] = std::string(protocolName);
|
||||
}
|
||||
|
||||
bool IPCFuzzController::ObserveIPCMessage(mozilla::ipc::NodeChannel* channel,
|
||||
|
@ -506,11 +507,12 @@ bool IPCFuzzController::MakeTargetDecision(
|
|||
*is_cons = true;
|
||||
}
|
||||
|
||||
#ifdef FUZZ_DEBUG
|
||||
MOZ_FUZZING_NYX_PRINTF(
|
||||
"DEBUG: MakeTargetDecision: Protocol: %s msgType: %s\n",
|
||||
ProtocolIdToName(ids.second), IPC::StringFromIPCMessageType(*type));
|
||||
#endif
|
||||
"DEBUG: MakeTargetDecision: Top-Level Protocol: %s Protocol: %s msgType: "
|
||||
"%s (%u %u %d)\n",
|
||||
portNameToProtocolName[*name].c_str(), ProtocolIdToName(ids.second),
|
||||
IPC::StringFromIPCMessageType(*type), actorIndex, actors.size(),
|
||||
*actorId);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -123,6 +123,10 @@ class IPCFuzzController {
|
|||
std::unordered_map<mojo::core::ports::PortName, mojo::core::ports::NodeName>
|
||||
portNodeName;
|
||||
|
||||
// This is a mapping from port name to protocol name, purely for debugging.
|
||||
std::unordered_map<mojo::core::ports::PortName, std::string>
|
||||
portNameToProtocolName;
|
||||
|
||||
// This maps each ProtocolId (IPCMessageStart) to the number of valid
|
||||
// messages for that particular type.
|
||||
std::unordered_map<mozilla::ipc::ProtocolId, uint32_t> validMsgTypes;
|
||||
|
|
Загрузка…
Ссылка в новой задаче