This is an archive of the discontinued LLVM Phabricator instance.

[FuzzMutate] Avoid calling function with metadata/token parameter/return type for `InsertFunctionStrategy`
ClosedPublic

Authored by HazyFish on May 15 2023, 5:01 PM.

Details

Summary

When there is a function with metadata/token parameter/return type, InsertFunctionStrategy will crash.

This patch fixes the problem by falling back to create function declaration when the sampled function contains metadata/token parameter/return type.

Diff Detail

Event Timeline

HazyFish created this revision.May 15 2023, 5:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 15 2023, 5:01 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
HazyFish requested review of this revision.May 15 2023, 5:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 15 2023, 5:01 PM
HazyFish updated this revision to Diff 522392.May 15 2023, 5:11 PM
HazyFish updated this revision to Diff 523559.May 18 2023, 2:19 PM
HazyFish retitled this revision from [FuzzMutate] Avoid calling function with metadata parameter for `InsertFunctionStrategy` to [FuzzMutate] Avoid calling function with metadata/token parameter/return type for `InsertFunctionStrategy`.
HazyFish edited the summary of this revision. (Show Details)

Handle token type and add check for return type as well

HazyFish updated this revision to Diff 523560.May 18 2023, 2:22 PM

reorder conditions to improve efficiency

Peter accepted this revision.Jun 1 2023, 1:52 PM
This revision is now accepted and ready to land.Jun 1 2023, 1:52 PM