Changeset 104549 in vbox
- Timestamp:
- May 8, 2024 12:27:24 PM (7 months ago)
- Location:
- trunk/src/VBox/Runtime/common/fuzz
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/fuzz/fuzz-observer.cpp
r99739 r104549 597 597 uint32_t cbStateWr = (uint32_t)cbState; 598 598 rc = RTPipeWriteBlocking(pExecCtx->hPipeStdinW, &cbStateWr, sizeof(cbStateWr), NULL); 599 rc = RTPipeWriteBlocking(pExecCtx->hPipeStdinW, pvState, cbState, NULL); 599 if (RT_SUCCESS(rc)) 600 rc = RTPipeWriteBlocking(pExecCtx->hPipeStdinW, pvState, cbState, NULL); 600 601 if (RT_SUCCESS(rc)) 601 602 { … … 636 637 else if (achBuf[i] == 'A') 637 638 { 638 /** @todo Advance our fuzzer to get the added input. */ 639 while (cFuzzedInputs--) 640 { 641 RTFUZZINPUT hFuzzInput; 642 rc = RTFuzzCtxInputGenerate(pThis->hFuzzCtx, &hFuzzInput); 643 if (RT_SUCCESS(rc)) 644 RTFuzzInputRelease(hFuzzInput); 645 } 646 647 /* We should be at the input generated by the client now. */ 648 RTFUZZINPUT hFuzzInput; 649 rc = RTFuzzCtxInputGenerate(pThis->hFuzzCtx, &hFuzzInput); 650 if (RT_SUCCESS(rc)) 651 rc = RTFuzzInputAddToCtxCorpus(hFuzzInput); 639 652 } 640 653 } … … 832 845 AssertFailed(); 833 846 834 /*835 * Check whether we reached an unknown target state and add the input to the836 * corpus in that case.837 */838 rc = RTFuzzTgtStateAddToRecorder(pExecCtx->hTgtState);839 847 if (RT_SUCCESS(rc)) 840 848 { 841 /* Add to corpus and create a new target state for the next run. */ 842 RTFuzzInputAddToCtxCorpus(hFuzzInput); 843 RTFuzzTgtStateRelease(pExecCtx->hTgtState); 844 pExecCtx->hTgtState = NIL_RTFUZZTGTSTATE; 845 rc = RTFuzzTgtRecorderCreateNewState(pThis->hTgtRec, &pExecCtx->hTgtState); 846 AssertRC(rc); 847 } 848 else 849 { 850 Assert(rc == VERR_ALREADY_EXISTS); 851 /* Reset the state for the next run. */ 852 rc = RTFuzzTgtStateReset(pExecCtx->hTgtState); 853 AssertRC(rc); 849 /* 850 * Check whether we reached an unknown target state and add the input to the 851 * corpus in that case. 852 */ 853 rc = RTFuzzTgtStateAddToRecorder(pExecCtx->hTgtState); 854 if (RT_SUCCESS(rc)) 855 { 856 /* Add to corpus and create a new target state for the next run. */ 857 RTFuzzInputAddToCtxCorpus(hFuzzInput); 858 RTFuzzTgtStateRelease(pExecCtx->hTgtState); 859 pExecCtx->hTgtState = NIL_RTFUZZTGTSTATE; 860 rc = RTFuzzTgtRecorderCreateNewState(pThis->hTgtRec, &pExecCtx->hTgtState); 861 AssertRC(rc); 862 } 863 else 864 { 865 Assert(rc == VERR_ALREADY_EXISTS); 866 /* Reset the state for the next run. */ 867 rc = RTFuzzTgtStateReset(pExecCtx->hTgtState); 868 AssertRC(rc); 869 } 854 870 } 855 871 RTFuzzInputRelease(hFuzzInput); … … 1068 1084 else 1069 1085 rc = VERR_BUFFER_OVERFLOW; 1070 fSep = true;1086 /*fSep = true; Not used below currently. */ 1071 1087 } 1072 1088 … … 1348 1364 int rc = VINF_SUCCESS; 1349 1365 if (!cProcs) 1350 cProcs = RT_MIN(RTMpGetPresentCoreCount(), sizeof(uint64_t) * 8); 1366 { 1367 cProcs = RTMpGetPresentCoreCount(); 1368 cProcs = RT_MIN(cProcs, sizeof(uint64_t) * 8); 1369 } 1351 1370 1352 1371 rc = rtFuzzObsSetupSanitizerCfg(pThis); -
trunk/src/VBox/Runtime/common/fuzz/fuzz-target-recorder.cpp
r99739 r104549 346 346 } 347 347 348 rc = RTSemRWReleaseRead(pThis->hSemRwEdges); AssertRC(rc); 348 int rc2 = RTSemRWReleaseRead(pThis->hSemRwEdges); AssertRC(rc2); 349 if ( RT_FAILURE(rc2) 350 && RT_SUCCESS(rc)) 351 rc = rc2; 349 352 } 350 353 -
trunk/src/VBox/Runtime/common/fuzz/fuzzmastercmd.cpp
r99739 r104549 474 474 RTJsonValueRelease(hVal); 475 475 } 476 if (RT_FAILURE(rc)) 477 break; 476 478 rc = RTJsonIteratorNext(hEnvIt); 477 479 } while (RT_SUCCESS(rc)); … … 549 551 RTJsonValueRelease(hVal); 550 552 } 553 if (RT_FAILURE(rc)) 554 break; 555 551 556 rc = RTJsonIteratorNext(hSanIt); 552 557 } while (RT_SUCCESS(rc)); … … 984 989 RTJsonValueRelease(hVal); 985 990 } 991 if (RT_FAILURE(rc)) 992 break; 993 986 994 rc = RTJsonIteratorNext(hTgtIt); 987 995 } while (RT_SUCCESS(rc)); … … 1788 1796 /* Option variables: */ 1789 1797 bool fDaemonize = false; 1790 bool fDaemonized = false;1791 1798 const char *pszLoadCfg = NULL; 1792 1799 RTFUZZCMDMASTER This; … … 1833 1840 1834 1841 case 'Z': 1835 fDaemonized = true;1836 1842 fDaemonize = false; 1837 1843 break;
Note:
See TracChangeset
for help on using the changeset viewer.