Skip to content

Commit

Permalink
Add SIMULATOR1_FUZZING_ORIGIN to represent a new simulator-based fuzz…
Browse files Browse the repository at this point in the history
…ing proxy origin

PiperOrigin-RevId: 523850366
  • Loading branch information
sarahjkim authored and copybara-github committed Apr 13, 2023
1 parent f75fb83 commit fabe275
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions common/snapshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ class Snapshot::Metadata {
kLlvmMca = 9,
kUnicornCustom = 10,
kEmulator1 = 11,
kSimulator1 = 12,
};

Metadata() : origin_(Origin::kUndefined) {}
Expand Down
2 changes: 2 additions & 0 deletions common/snapshot_proto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ static_assert(ToInt(Snapshot::Metadata::Origin::kLlvmMca) ==
ToInt(proto::SnapshotMetadata::LLVM_MCA_FUZZING_ORIGIN));
static_assert(ToInt(Snapshot::Metadata::Origin::kEmulator1) ==
ToInt(proto::SnapshotMetadata::EMULATOR1_FUZZING_ORIGIN));
static_assert(ToInt(Snapshot::Metadata::Origin::kSimulator1) ==
ToInt(proto::SnapshotMetadata::SIMULATOR1_FUZZING_ORIGIN));
static_assert(ToInt(Snapshot::Metadata::Origin::kUnicornCustom) ==
ToInt(proto::SnapshotMetadata::UNICORNCUSTOM_FUZZING_ORIGIN));

Expand Down
3 changes: 2 additions & 1 deletion proto/snapshot.proto
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ message SnapshotMetadata {
// * creation from nothing -- all the enum values with _ORIGIN suffix
// * transfromation from one (or in the future several) snapshots
// -- all the enum values with _TRANSFORM suffix.
// Next ID: 12
// Next ID: 13
enum Origin {
// When origin is unknown or unimportant,
// e.g. snapshot was made by some test-generation logic.
Expand All @@ -192,6 +192,7 @@ message SnapshotMetadata {
IACA_FUZZING_ORIGIN = 8;
LLVM_MCA_FUZZING_ORIGIN = 9;
EMULATOR1_FUZZING_ORIGIN = 11;
SIMULATOR1_FUZZING_ORIGIN = 12;

// Unicorn fuzzer with a custom input sequence generator.
// TODO(ksteuck): [cleanup] This is not a very scalable way of defining
Expand Down

0 comments on commit fabe275

Please sign in to comment.