This is an archive of the discontinued LLVM Phabricator instance.

Add ModuleInfo to TracePC
AbandonedPublic

Authored by aarongreen on Jan 12 2021, 9:30 AM.

Details

Summary

This change adds a ModuleInfo struct to fuzzer::TracePC, and functions to populate such structs with details about the currently loaded modules.

It also offsets some of the space increase of storing the hash in the PC tables by removing some unused fields from the Counter regions.

Diff Detail

Event Timeline

aarongreen requested review of this revision.Jan 12 2021, 9:30 AM
aarongreen created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2021, 9:30 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
aarongreen updated this revision to Diff 321772.Feb 5 2021, 8:40 AM
morehouse added inline comments.Feb 5 2021, 11:30 AM
compiler-rt/lib/fuzzer/FuzzerDSORelative.h
28

Please add comments explaining each struct member.

compiler-rt/lib/fuzzer/FuzzerTracePC.cpp
45

reinterpret_cast

55

reinterpret_cast

57
251

Please add a comment explaining why we calculate LastFeature this way.

aarongreen updated this revision to Diff 327897.Mar 3 2021, 1:03 PM
aarongreen marked 5 inline comments as done.

Addressing morehouse's comments. Also adjusted size and stack depth functions in TracePC to address some concerns that are in the following change (D94514), but are rleated to files and functions being changed here.

compiler-rt/lib/fuzzer/FuzzerTracePC.cpp
45

Used Module::Size() instead.

55

static_cast works, whereas reinterpret_cast does not.

morehouse accepted this revision.Mar 3 2021, 2:27 PM
morehouse added inline comments.
compiler-rt/lib/fuzzer/FuzzerTracePC.cpp
54

Please fix this lint.

242
This revision is now accepted and ready to land.Mar 3 2021, 2:27 PM

fyi: I'd like D97992 to land first; and for this change to be rebased on top of that.

aarongreen marked an inline comment as done.

Changed DsoInfo to ModuleInfo (and changed PrintModuleInfo to PrintModuleSummary). Moved asserts in CollectFeatures to unit tests.

aarongreen retitled this revision from Add DSO functions to TracePC to Add ModuleInfo to TracePC.
aarongreen edited the summary of this revision. (Show Details)

Moved the ModuleInfo struct from FuzzerModuleRelative.h to FuzzerTracePC.h and added MoudleInfoByHash. Along with the decision in D94514 to not support relative features when -fork=1, this obviates the need for D94508 and D94509.

aarongreen abandoned this revision.Sep 1 2021, 9:00 AM

Multiprocess fuzzing will not be supported by the libFuzzer maintainers. Fuchsia has implemented a new approach with their Component Fuzzing Framework (RFC-117).