This is an archive of the discontinued LLVM Phabricator instance.

[lldb][fuzz] Allow expression fuzzer to be passed as a flag.
ClosedPublic

Authored by rupprecht on Sep 8 2022, 6:33 PM.

Details

Summary

The expression fuzzer checks an environment variable, LLDB_FUZZER_TARGET, to get the fuzzer target binary. This is fine, but internally our tooling for running fuzz tests only has proper handling for flag values. It's surprisingly complicated to add support for that, and allowing it to be passed via flag seems reasonable anyway.

Diff Detail

Event Timeline

rupprecht created this revision.Sep 8 2022, 6:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 8 2022, 6:33 PM
rupprecht requested review of this revision.Sep 8 2022, 6:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 8 2022, 6:33 PM
cassanova added inline comments.Sep 13 2022, 10:42 AM
lldb/tools/lldb-fuzzer/lldb-expression-fuzzer/lldb-expression-fuzzer.cpp
65–67

I think having a flag for the fuzzer target alongside the env variable is a good addition. My only wonder is if there should be an error message if no flag is specified so that anyone that uses this knows that they can use a flag as well.

  • Update error message to reference the new command line flag
rupprecht marked an inline comment as done.Sep 13 2022, 12:40 PM
rupprecht added inline comments.
lldb/tools/lldb-fuzzer/lldb-expression-fuzzer/lldb-expression-fuzzer.cpp
65–67

That makes sense -- let me know if the updated wording looks OK.

The wording is good, LGTM!

cassanova accepted this revision.Sep 13 2022, 2:12 PM
This revision is now accepted and ready to land.Sep 13 2022, 2:12 PM
This revision was automatically updated to reflect the committed changes.
rupprecht marked an inline comment as done.