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

Mutate function produced an error #162

Open
z1w opened this issue Feb 10, 2020 · 2 comments
Open

Mutate function produced an error #162

z1w opened this issue Feb 10, 2020 · 2 comments

Comments

@z1w
Copy link

z1w commented Feb 10, 2020

Hi,

I wrote a parser function P, a renderer function R and try to use the mutate function.

Given an input I, if I call m = P(I), and J = R(m), I am able to produce a string J = I.

If I have m = P(I), mutator.Mutate(&m, 100), J = R(m), at execution, mutator.Mutate(&m, 100) would produce a system error. The message is:

#########################################
terminate called after throwing an instance of 'std::system_error'
what(): Unknown error -1
Aborted (core dumped)
##########################################

I installed libprotobuf-mutator two years ago, and the mutator worked fine. Using the recent version, I got this error. I am not sure why I received this error.

Here is the stack trace:
################################################################
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007f8ecaeb6801 in __GI_abort () at abort.c:79
#2 0x00007f8ecb50b957 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007f8ecb511ab6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007f8ecb511af1 in std::terminate() ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007f8ecb511d24 in __cxa_throw ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007f8ecb50da19 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7 0x00007f8ecb97dce3 in std::call_once<void (&)(google::protobuf::internal::DescriptorTable const*), google::protobuf::internal::DescriptorTable const*&> (
__f=@0x7f8ecb988800: {void (const google::protobuf::internal::DescriptorTable )} 0x7f8ecb988800 <google::protobuf::(anonymous namespace)::AssignDescriptorsImpl(google::protobuf::internal::DescriptorTable const)>, __once=...)
at /usr/include/c++/7/mutex:698
#8 google::protobuf::internal::AssignDescriptors (table=)
at google/protobuf/generated_message_reflection.cc:2407
#9 0x00005622487fa7dd in input::Group::GetMetadataStatic() ()
#10 0x00005622487f3b85 in input::Group::GetMetadata() const ()
#11 0x000056224880e6f9 in google::protobuf::Message::GetDescriptor() const ()
#12 0x0000562248808ebe in protobuf_mutator::(anonymous namespace)::MutationSampler::Sample(google::protobuf::Message*) ()
#13 0x0000562248808dfb in protobuf_mutator::(anonymous namespace)::MutationSampl---Type to continue, or q to quit---return
er::MutationSampler(bool, std::linear_congruential_engine<unsigned long, 48271ul, 0ul, 2147483647ul>, google::protobuf::Message) ()
#14 0x0000562248809e59 in protobuf_mutator::Mutator::MutateImpl(google::protobuf::Message*, unsigned long) ()
#15 0x0000562248809b51 in protobuf_mutator::Mutator::Mutate(google::protobuf::Message*, unsigned long) ()
#16 0x00005622487a8c92 in main ()
#########################################################

Thanks!

@vitalybuka
Copy link
Collaborator

can you try to build mutator with debug info?

@pzlvv
Copy link

pzlvv commented Jun 30, 2020

Did you link the pthread?

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

3 participants