Status: New
Owner: liuj...@google.com
Labels: Type-Defect Priority-Medium

New issue 408 by markus.d...@gmail.com: sigsegv when running on arm - help in debug
http://code.google.com/p/protobuf/issues/detail?id=408

What steps will reproduce the problem?
1. compile and link protobuf 4.2.1 on arm (in my case for openwrt)
2. try to run program

What is the expected output? What do you see instead?

get a sigsegv on run


What version of the product are you using? On what operating system?

2.4.1

Please provide any additional information below.

backtrace with gdb:

root@OpenWrt:~# gdb boblightd


dlopen failed on 'libthread_db.so.1' - File not found
GDB will not be able to debug pthreads.

GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mips-openwrt-linux"...
(gdb) run
Starting program: /usr/bin/boblightd

Program received signal SIGSEGV, Segmentation fault.
0x778b5c98 in memcmp () from /lib/libc.so.0
(gdb) bt
#0  0x778b5c98 in memcmp () from /lib/libc.so.0
#1 0x77bfd810 in std::tr1::_Hashtable<std::string, std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type>, std::allocator<std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type> >, std::_Select1st<std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type> >, std::equal_to<std::string>, google::protobuf::hash<std::string>, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true>::_M_find_node (__p=0x481730, __k=Unhandled dwarf expression opcode 0xf3
)
at /data/openwrt/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.1/../../../../mips-openwrt-linux-uclibc/include/c++/4.7.1/bits/char_traits.h:257 #2 0x77c06e88 in std::tr1::__detail::_Map_base<std::string, std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type>, std::_Select1st<std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type> >, true, std::tr1::_Hashtable<std::string, std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type>, std::allocator<std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type> >, std::_Select1st<std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type> >, std::equal_to<std::string>, google::protobuf::hash<std::string>, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true> >::operator[] (this=0x77c41940, __k=@0x7fad4d8c)
    at google/protobuf/compiler/parser.cc:838
#3 0x77c004c0 in MakeTypeNameTable () at google/protobuf/compiler/parser.cc:838
#4  0x77b60194 in _GLOBAL__sub_I_parser.cc () from /usr/lib/libprotobuf.so.7
#5  0x77c07694 in __do_global_ctors_aux () from /usr/lib/libprotobuf.so.7
#6  0x77b5fd00 in ?? () from /usr/lib/libprotobuf.so.7
warning: GDB can't find the start of the function at 0x77b5fcff.

    GDB is unable to find the start of the function at 0x77b5fcff
and thus can't determine the size of that function's stack frame.
This means that GDB may be unable to access that stack frame, or
the frames below it.
    This problem is most likely caused by an invalid program counter or
stack pointer.
    However, if you think GDB should simply search farther back
from 0x77b5fcff for code which looks like the beginning of a
function, you can increase the range of the search using the `set
heuristic-fence-post' command.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) set heuristic-fence-post 1
(gdb) bt
#0  0x778b5c98 in memcmp () from /lib/libc.so.0
#1 0x77bfd810 in std::tr1::_Hashtable<std::string, std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type>, std::allocator<std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type> >, std::_Select1st<std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type> >, std::equal_to<std::string>, google::protobuf::hash<std::string>, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true>::_M_find_node (__p=0x481730, __k=Unhandled dwarf expression opcode 0xf3
)
at /data/openwrt/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.1/../../../../mips-openwrt-linux-uclibc/include/c++/4.7.1/bits/char_traits.h:257 #2 0x77c06e88 in std::tr1::__detail::_Map_base<std::string, std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type>, std::_Select1st<std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type> >, true, std::tr1::_Hashtable<std::string, std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type>, std::allocator<std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type> >, std::_Select1st<std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type> >, std::equal_to<std::string>, google::protobuf::hash<std::string>, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true> >::operator[] (this=0x77c41940, __k=@0x7fad4d8c)
    at google/protobuf/compiler/parser.cc:838
#3 0x77c004c0 in MakeTypeNameTable () at google/protobuf/compiler/parser.cc:838
#4  0x77b60194 in _GLOBAL__sub_I_parser.cc () from /usr/lib/libprotobuf.so.7
#5  0x77c07694 in __do_global_ctors_aux () from /usr/lib/libprotobuf.so.7
#6  0x77b5fd00 in ?? () from /usr/lib/libprotobuf.so.7
warning: GDB can't find the start of the function at 0x77b5fcff.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)


can anyone help me to debug this further? thanks

--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to