google-code-export / protobuf

Automatically exported from code.google.com/p/protobuf
Other
1 stars 1 forks source link

FileDescriptorTables double free problem when use protobuf both in shared library and in main.cpp #672

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. compile *.pb.cpp file with main.cpp to generate executable 
2. compile *.pb.cpp file witeh other.cpp to generate a shared library test.so
3. dlopen test.so in main.cpp and call the function in shared library
4. when process end, there will be a double free corruption catched.

What is the expected output? What do you see instead?
hello in so
*** glibc detected *** ./main: double free or corruption (!prev): 
0x000000000097e850 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7ec66)[0x7f2e9d1d7c66]
./main[0x4479de]
./main[0x42cc1b]
./main[0x42b628]
./main[0x42a5db]
./main[0x429935]
./main[0x41370c]
./main[0x413726]
./main[0x413740]
./main(_ZN6google8protobuf20FileDescriptorTablesD1Ev+0x31)[0x41389b]
/lib/x86_64-linux-gnu/libc.so.6(+0x3b9d1)[0x7f2e9d1949d1]
/lib/x86_64-linux-gnu/libc.so.6(+0x3ba55)[0x7f2e9d194a55]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf4)[0x7f2e9d17a794]
./main[0x4070c9]
======= Memory map: ========

What version of the product are you using? On what operating system?
protobuf 2.5 on Linux ubuntu 3.11.0-15-generic 

Please provide any additional information below.
it seems something wrong with the deconstruction with FileDescriptorTables

Original issue reported on code.google.com by leoxiang...@gmail.com on 13 Sep 2014 at 2:44

Attachments: