Changeset 83428 in vbox for trunk/include/iprt
- Timestamp:
- Mar 25, 2020 7:44:11 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 136647
- Location:
- trunk/include/iprt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/fuzz.h
r83266 r83428 54 54 /** NIL fuzzer input handle. */ 55 55 #define NIL_RTFUZZINPUT ((RTFUZZINPUT)~(uintptr_t)0) 56 57 58 /** A fuzzer config handle. */ 59 typedef struct RTFUZZCFGINT *RTFUZZCFG; 60 /** Pointer to a fuzzer config handle. */ 61 typedef RTFUZZCFG *PRTFUZZCFG; 62 /** NIL fuzzer config handle. */ 63 #define NIL_RTFUZZCFG ((RTFUZZCFG)~(uintptr_t)0) 56 64 57 65 … … 142 150 143 151 152 /** @name RTFUZZCFG_IMPORT_F_XXX - Flags for RTFuzzCfgImport(). 153 * @{ */ 154 /** Default flags. */ 155 #define RTFUZZCFG_IMPORT_F_DEFAULT 0 156 /** Adds only the inputs and doesn't set any glboal configuration flags of the fuzzing context. */ 157 #define RTFUZZCFG_IMPORT_F_ONLY_INPUT RT_BIT_32(0) 158 /** Mask of all valid flags. */ 159 #define RTFUZZCFG_IMPORT_F_VALID UINT32_C(0x00000001) 160 /** @} */ 161 162 144 163 /** 145 164 * Fuzzing context state export callback. … … 332 351 333 352 /** 353 * Adds a new seed to the input corpus of the given fuzzing context from the given VFS I/O stream. 354 * 355 * @returns IPRT status code. 356 * @param hFuzzCtx The fuzzing context handle. 357 * @param hVfsIos The VFS I/O stream handle to load the seed from. 358 */ 359 RTDECL(int) RTFuzzCtxCorpusInputAddFromVfsIoStrm(RTFUZZCTX hFuzzCtx, RTVFSIOSTREAM hVfsIos); 360 361 /** 362 * Adds a new seed to the input corpus of the given fuzzing context from the given VFS I/O stream - extended version. 363 * 364 * @returns IPRT status code. 365 * @param hFuzzCtx The fuzzing context handle. 366 * @param hVfsIos The VFS I/O stream handle to load the seed from. 367 * @param offMutStart Start offset at which a mutation can happen. 368 * @param cbMutRange Size of the range in bytes where a mutation can happen, 369 * use UINT64_MAX to allow mutations till the end of the input. 370 */ 371 RTDECL(int) RTFuzzCtxCorpusInputAddFromVfsIoStrmEx(RTFUZZCTX hFuzzCtx, RTVFSIOSTREAM hVfsIos, 372 uint64_t offMutStart, uint64_t cbMutRange); 373 374 /** 334 375 * Adds new seeds to the input corpus of the given fuzzing context from the given directory. 335 376 * … … 497 538 */ 498 539 RTDECL(int) RTFuzzInputRemoveFromCtxCorpus(RTFUZZINPUT hFuzzInput); 540 541 542 /** 543 * Creates a fuzzing config from the given VFS file handle. 544 * 545 * @returns IPRT status code. 546 * @param phFuzzCfg Where to store the handle to the fuzzing config on success. 547 * @param hVfsFile The VFS file to use (retained). 548 * @param pErrInfo Where to store extended error info. Optional. 549 */ 550 RTDECL(int) RTFuzzCfgCreateFromVfsFile(PRTFUZZCFG phFuzzCfg, RTVFSFILE hVfsFile, PRTERRINFO pErrInfo); 551 552 /** 553 * Creates a fuzzing config from the given file path. 554 * 555 * @returns IPRT status code. 556 * @param phFuzzCfg Where to store the handle to the fuzzing config on success. 557 * @param pszFilename Filename to load the config from. 558 * @param pErrInfo Where to store extended error info. Optional. 559 */ 560 RTDECL(int) RTFuzzCfgCreateFromFile(PRTFUZZCFG phFuzzCfg, const char *pszFilename, PRTERRINFO pErrInfo); 561 562 /** 563 * Retains a reference to the given fuzzing config. 564 * 565 * @returns New reference count on success. 566 * @param hFuzzCfg Handle of the fuzzing config. 567 */ 568 RTDECL(uint32_t) RTFuzzCfgRetain(RTFUZZCFG hFuzzCfg); 569 570 /** 571 * Releases a reference from the given fuzzing config, destroying it when reaching 0. 572 * 573 * @returns New reference count on success, 0 if the fuzzing config got destroyed. 574 * @param hFuzzCfg Handle of the fuzzing config. 575 */ 576 RTDECL(uint32_t) RTFuzzCfgRelease(RTFUZZCFG hFuzzCfg); 577 578 /** 579 * Imports the given fuzzing config into a previously created fuzzing context. 580 * 581 * @returns IPRT status code. 582 * @param hFuzzCfg Handle of the fuzzing config. 583 * @param hFuzzCtx Handle of the fuzzing context. 584 * @param fFlags Flags controlling what to import exactly, combination of RTFUZZCFG_IMPORT_F_XXX. 585 */ 586 RTDECL(int) RTFuzzCfgImport(RTFUZZCFG hFuzzCfg, RTFUZZCTX hFuzzCtx, uint32_t fFlags); 587 588 /** 589 * Queries the custom config for the controller of the fuzzing process. 590 * 591 * @returns IPRT status code. 592 * @param hFuzzCfg Handle of the fuzzing config. 593 * @param phVfsFile Where to store the handle of the VFS file containing the custom config. 594 */ 595 RTDECL(int) RTFuzzCfgQueryCustomCfg(RTFUZZCFG hFuzzCfg, PRTVFSFILE phVfsFile); 499 596 500 597 -
trunk/include/iprt/mangling.h
r83426 r83428 1057 1057 # define RTFuzzCtxCorpusInputAddFromFileEx RT_MANGLER(RTFuzzCtxCorpusInputAddFromFileEx) 1058 1058 # define RTFuzzCtxCorpusInputAddFromVfsFile RT_MANGLER(RTFuzzCtxCorpusInputAddFromVfsFile) 1059 # define RTFuzzCtxCorpusInputAddFromVfsFileEx RT_MANGER(RTFuzzCtxCorpusInputAddFromVfsFileEx) 1059 # define RTFuzzCtxCorpusInputAddFromVfsFileEx RT_MANGLER(RTFuzzCtxCorpusInputAddFromVfsFileEx) 1060 # define RTFuzzCtxCorpusInputAddFromVfsIoStrm RT_MANGLER(RTFuzzCtxCorpusInputAddFromVfsIoStrm) 1061 # define RTFuzzCtxCorpusInputAddFromVfsIoStrmEx RT_MANGLER(RTFuzzCtxCorpusInputAddFromVfsIoStrmEx) 1060 1062 # define RTFuzzCtxCreate RT_MANGLER(RTFuzzCtxCreate) 1061 1063 # define RTFuzzCtxCreateFromState RT_MANGLER(RTFuzzCtxCreateFromState)
Note:
See TracChangeset
for help on using the changeset viewer.