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

Fix avro_read segfault #346

Open
alevenberg opened this issue Jun 3, 2024 · 3 comments
Open

Fix avro_read segfault #346

alevenberg opened this issue Jun 3, 2024 · 3 comments

Comments

@alevenberg
Copy link
Member

Current behavior:

❯ .build/avro_read alevenb-test usa_names top10_names
[1] 1002898 segmentation fault .build/avro_read alevenb-test usa_names top10_names

GDB shows:


Thread 1 "avro_read" received signal SIGSEGV, Segmentation fault.
0x0000000000000040 in ?? ()
(gdb) bt
#0  0x0000000000000040 in ?? ()
#1  0x00005555556af4c7 in avro::GenericDatum* std::__do_uninit_copy<__gnu_cxx::__normal_iterator<avro::GenericDatum const*, std::vector<avro::GenericDatum, std::allocator<avro::GenericDatum> > >, avro::GenericDatum*>(__gnu_cxx::__normal_iterator<avro::GenericDatum const*, std::vector<avro::GenericDatum, std::allocator<avro::GenericDatum> > >, __gnu_cxx::__normal_iterator<avro::GenericDatum const*, std::vector<avro::GenericDatum, std::allocator<avro::GenericDatum> > >, avro::GenericDatum*) ()
#2  0x00005555556c8109 in avro::makeRecordNode(avro::json::Entity const&, avro::Name const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, avro::json::Entity, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::alloc--Type <RET> for more, q to quit, c to continue without paging--
ator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, avro::json::Entity> > > const&, std::map<avro::Name, std::shared_ptr<avro::Node>, std::less<avro::Name>, std::allocator<std::pair<avro::Name const, std::shared_ptr<avro::Node> > > >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#3  0x00005555556c9517 in avro::makeNode(avro::json::Entity const&, std::map<avro::Name, std::shared_ptr<avro::Node>, std::less<avro::Name>, std::allocator<std::pair<avro::Name const, std::shared_ptr<avro::Node> > > >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#4  0x00005555556ca9d6 in avro::compileJsonSchemaFromStream(avro::InputStream&) ()
#5  0x00005555556cac52 in avro::compileJsonSchema(std::istream&, avro::ValidSchema&) ()
--Type <RET> for more, q to quit, c to continue without paging--
#6  0x00005555556a83bb in main ()
(gdb) 
@alevenberg alevenberg self-assigned this Jun 3, 2024
@alevenberg
Copy link
Member Author

Sorry, I didn't have time to work on this :(

Unassigning

@alevenberg alevenberg removed their assignment Jun 20, 2024
@cuiy0006
Copy link

cuiy0006 commented Sep 3, 2024

@cuiy0006
Copy link

cuiy0006 commented Sep 4, 2024

I am testing with avro-cpp 1.11.3. Compiling with c++14 also requires boost dependencies.

I can reproduce this segfault on both c++14 and c++17.

I also tried to load a very simple json from file, but got similar segfault.

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

2 participants