microsoft / onefuzz

A self-hosted Fuzzing-As-A-Service platform
MIT License
2.82k stars 199 forks source link

[agent/srcview] Parse inline sites for additional source lines. #3362

Closed wanghenry-msft closed 1 year ago

wanghenry-msft commented 1 year ago

Summary of the Pull Request

Previously in srcview, the inlined functions DO NOT get properly added to the source lines because those records of line entries are recorded via an S_INLINESITE symbol data, with more information located in the inlinee debug subsection.

Required some major refactoring in pdbcache, and fundamentally, the modoffs to lines will fundamentally be changed from a 1:1 relationship to a 1:n relationship, since there could be:

  1. multiple lines that correspond to some modoff if that particular modoff corresponds to a multiline statement.
  2. multiple lines from potentially different files due to the possibly inlined functions.

PR Checklist

Info on Pull Request

What does this include?

Validation Steps Performed

How does someone test & validate?

wanghenry-msft commented 1 year ago

Oops, totally forgot to join microsoft org before making this PR. Should I just create a new PR or can we still salvage this?

codecov-commenter commented 1 year ago

Codecov Report

Merging #3362 (8f96b0b) into main (02b74c6) will decrease coverage by 1.15%. Report is 3 commits behind head on main. The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #3362      +/-   ##
==========================================
- Coverage   31.68%   30.53%   -1.15%     
==========================================
  Files         308      133     -175     
  Lines       37626    14328   -23298     
==========================================
- Hits        11921     4375    -7546     
+ Misses      25705     9953   -15752     

see 175 files with indirect coverage changes

Porges commented 1 year ago

@wanghenry-msft Oops, totally forgot to join microsoft org before making this PR. Should I just create a new PR or can we still salvage this?

No, that's not a problem. We do require that the code is rustfmt'd and clippy-clean though 🙂

wanghenry-msft commented 1 year ago

so apparently I also found out that cross module indexes are a thing and also need to be accounted for.

comcma commented 1 year ago

This PR has been moved to an internal fork. And can be closed, as srcview is not maintained nor owned by onefuzz.