Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when using CustomProtoMutator for multiple protos #191

Open
fmeum opened this issue Jun 2, 2021 · 0 comments
Open

Crash when using CustomProtoMutator for multiple protos #191

fmeum opened this issue Jun 2, 2021 · 0 comments

Comments

@fmeum
Copy link

fmeum commented Jun 2, 2021

I have multiple protos that I need to mutate in a libFuzzer fuzz target and am thus calling CustomProtoMutator directly instead of using the macro. However, the Swap calls in the LastMutationCache crash when trying to swap out one proto for another:

[libprotobuf FATAL external/com_google_protobuf/src/google/protobuf/generated_message_reflection.cc:614] CHECK failed: (message2->GetReflection()) == (this): Second argument to Swap() (of type "some_proto") is not compatible with this reflection object (which is for type "some_other_proto"). Note that the exact same class is required; not just the same descriptor.

Patching out the cache resolved this issue. Would it be possible to either invalidate the cache if a new proto is mutated or add a way to disable the cache in CustomProtoMutator calls?

fmeum added a commit to CodeIntelligenceTesting/libprotobuf-mutator that referenced this issue Feb 4, 2022
The cache is broken when mutating multiple protos at once.
See:
google#191
fmeum added a commit to CodeIntelligenceTesting/libprotobuf-mutator that referenced this issue Feb 4, 2022
The cache is broken when mutating multiple protos at once.
See:
google#191
fmeum added a commit to CodeIntelligenceTesting/libprotobuf-mutator that referenced this issue Feb 4, 2022
The cache is broken when mutating multiple protos at once.
See:
google#191
bertschneider pushed a commit to CodeIntelligenceTesting/libprotobuf-mutator that referenced this issue Jun 19, 2023
The cache is broken when mutating multiple protos at once.
See:
google#191
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant