VirtualBox

Changeset 77693 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Mar 13, 2019 9:24:29 PM (6 years ago)
Author:
vboxsync
Message:

Runtime/fuzz: Some more statistics, add possibility to configure the environment of the target process through the job config, add possibility to read SanitizerCoverage generated reports to scan for changes in executed paths for inputs to evaluate which mutations are interesting for further use

Location:
trunk/include/iprt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/fuzz.h

    r77658 r77693  
    116116
    117117
     118/** @name RTFUZZOBS_SANITIZER_F_XXX - Flags for RTFuzzObsSetTestBinarySanitizers().
     119 * @{ */
     120/** ASAN is compiled and enabled (observer needs to configure to abort on error to catch memory errors). */
     121#define RTFUZZOBS_SANITIZER_F_ASAN                 UINT32_C(0x00000001)
     122/** A converage sanitizer is compiled in which can be used to produce coverage reports aiding in the
     123 * fuzzing process. */
     124#define RTFUZZOBS_SANITIZER_F_SANCOV               UINT32_C(0x00000002)
     125/** @} */
     126
     127
    118128/**
    119129 * Fuzzing context state export callback.
     
    537547 */
    538548RTDECL(int) RTFuzzTgtStateAppendStderrFromPipe(RTFUZZTGTSTATE hFuzzTgtState, RTPIPE hPipe);
     549
     550/**
     551 * Adds the SanCov coverage information from the given file to the given target state.
     552 *
     553 * @returns IPRT status code.
     554 * @param   hFuzzTgtState       The fuzzed target state handle.
     555 * @param   pszFilename         Filename of the coverage report.
     556 */
     557RTDECL(int) RTFuzzTgtStateAddSanCovReportFromFile(RTFUZZTGTSTATE hFuzzTgtState, const char *pszFilename);
    539558
    540559
     
    658677
    659678/**
     679 * Sets an environment block to run the binary in.
     680 *
     681 * @returns IPRT status code.
     682 * @param   hFuzzObs            The fuzzing observer handle.
     683 * @param   hEnv                The environment block to set for the test binary.
     684 *                              Use RTENV_DEFAULT for the default process environment or
     685 *                              NULL for an empty environment.
     686 *
     687 * @note Upon successful return of this function the observer has taken ownership over the
     688 *       environment block and can alter it in unexpected ways. It also destroys the environment
     689 *       block when the observer gets destroyed. So don't touch the environment block after
     690 *       calling this function.
     691 */
     692RTDECL(int) RTFuzzObsSetTestBinaryEnv(RTFUZZOBS hFuzzObs, RTENV hEnv);
     693
     694/**
     695 * Makes the observer aware of any configured sanitizers for the test binary.
     696 *
     697 * @returns IPRT status code.
     698 * @param   hFuzzObs            The fuzzing observer handle.
     699 * @param   fSanitizers         Bitmask of compiled and enabled sanitiziers in the
     700 *                              target binary.
     701 */
     702RTDECL(int) RTFuzzObsSetTestBinarySanitizers(RTFUZZOBS hFuzzObs, uint32_t fSanitizers);
     703
     704/**
     705 * Sets maximum timeout until a process is considered hung and killed.
     706 *
     707 * @returns IPRT status code.
     708 * @param   hFuzzObs            The fuzzing observer handle.
     709 * @param   papszArgs           Pointer to the array of arguments.
     710 * @param   cArgs               Number of arguments.
     711 */
     712RTDECL(int) RTFuzzObsSetTestBinaryTimeout(RTFUZZOBS hFuzzObs, RTMSINTERVAL msTimeoutMax);
     713
     714/**
    660715 * Starts fuzzing the set binary.
    661716 *
  • trunk/include/iprt/mangling.h

    r77681 r77693  
    10661066# define RTFuzzObsSetTestBinary                         RT_MANGLER(RTFuzzObsSetTestBinary)
    10671067# define RTFuzzObsSetTestBinaryArgs                     RT_MANGLER(RTFuzzObsSetTestBinaryArgs)
     1068# define RTFuzzObsSetTestBinaryEnv                      RT_MANGLER(RTFuzzObsSetTestBinaryEnv)
     1069# define RTFuzzObsSetTestBinarySanitizers               RT_MANGLER(RTFuzzObsSetTestBinarySanitizers)
     1070# define RTFuzzObsSetTestBinaryTimeout                  RT_MANGLER(RTFuzzObsSetTestBinaryTimeout)
    10681071# define RTFuzzObsSetTmpDirectory                       RT_MANGLER(RTFuzzObsSetTmpDirectory)
    10691072# define RTFuzzTgtRecorderCreate                        RT_MANGLER(RTFuzzTgtRecorderCreate)
     
    10711074# define RTFuzzTgtRecorderRelease                       RT_MANGLER(RTFuzzTgtRecorderRelease)
    10721075# define RTFuzzTgtRecorderRetain                        RT_MANGLER(RTFuzzTgtRecorderRetain)
     1076# define RTFuzzTgtStateAddSanCovReportFromFile          RT_MANGLER(RTFuzzTgtStateAddSanCovReportFromFile)
    10731077# define RTFuzzTgtStateAddToRecorder                    RT_MANGLER(RTFuzzTgtStateAddToRecorder)
    10741078# define RTFuzzTgtStateAppendStderrFromBuf              RT_MANGLER(RTFuzzTgtStateAppendStderrFromBuf)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette