Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to record path coverage using edge coverage #275

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

sears-s
Copy link
Contributor

@sears-s sears-s commented Jun 30, 2022

Note - to clear up the terminology: path coverage is what is being recorded which uses a hash of the edge coverage.

To enable, the edgeCoverageModule option should be set to the name of the module's whose path coverage will be recorded. The view project webpage will show the number of covered paths.

Implementation notes:

  • Refactored the patch for drcov and added the option -target_module which enables edge coverage instrumentation and hashing
  • The edge coverage hash is parsed from the drcov output (only if the option is enabled) and is included in the TestResult and PutTestResultRequest messages
  • Added edge_coverage table which records hashes of edges and the number of executions
  • Added column to interesting_testcases that references an entry in the edge_coverage table
  • Every testcase result causes LMDatabaseManager::incrementEdgeCoverage() to be called
  • Modified signatures for LMDatabaseManager::addEntryToInterestingTestcasesTable(), TestExecutorDynRioSingle(), and TestExecutorDynRio::copyCoveredModulesToDebugExecutionOutput()

Limitations:

  • Only supports x86
  • Only supports DynamoRIO single mode
  • Only supports tracking coverage of one module

Relies on #274.

sears-s added a commit to sears-s/fluffi that referenced this pull request Jul 4, 2022
sears-s added a commit to sears-s/fluffi that referenced this pull request Jul 4, 2022
@sears-s sears-s mentioned this pull request Jul 4, 2022
sears-s added a commit to sears-s/fluffi that referenced this pull request Jul 4, 2022
@p0wer0xff p0wer0xff added the enhancement New feature or request label Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants