MCPcopy Create free account
hub / github.com/HexHive/NASS / solveStructDependency

Method solveStructDependency

fans/fuzzer-engine/fuzzer/src/dependency_solver.cpp:38–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 }
37}
38void DependencySolver::solveStructDependency() {
39 string structName = dependency["name"].asString();
40 FUZZER_LOGI("Dependent structure name: %s.", structName.c_str());
41 if (parcelableStructureReplyInfo.count(structName) == 0) {
42 FUZZER_LOGE("Structure %s does not exist.", structName.c_str());
43 exit(0);
44 }
45
46 Json::Value structure = parcelableStructureReplyInfo[structName];
47
48 // get the tx that this structure depends.
49 Json::Value txDependency = structure["dependency"];
50 Parcel tmp;
51 DependencySolver solver(&tmp, COMMON_DEPENDENCY, txDependency);
52 // read target structure to tmp parcel.
53 solver.solve();
54 tmp.setDataPosition(0);
55
56 // read target structure item.
57 uint32_t possIdx = dependency["possIdx"].asUInt();
58
59 Json::Value &info = structure["possibility"][possIdx];
60 Json::Value &variable = structure["variable"];
61 Json::Value &loop = structure["loop"];
62 Json::Value &constraint = structure["constraint"];
63
64 ParcelReaderWriter parcelReaderWriter(info["reply"], variable, loop,
65 constraint);
66 parcelReaderWriter.initParcelableStructRead(&tmp);
67 parcelReaderWriter.prepareDependencyRead(
68 info["reply"], dependency["varIdx"].asUInt(), targetParcel);
69 parcelReaderWriter.start();
70
71 return;
72}
73void DependencySolver::solveTxDependency() {
74
75 string txName = dependency["name"].asString();

Callers

nothing calls this directly

Calls 6

c_strMethod · 0.45
countMethod · 0.45
solveMethod · 0.45
prepareDependencyReadMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected