Core Dump with c++ 4.1.1

68 views
Skip to first unread message

Sushil Shelly

unread,
Aug 14, 2009, 11:52:37 AM8/14/09
to Kenton Varda, Protocol Buffers
Kenton and Team,

We recently moved to using c++ 4.1.1 and are getting a segmentation fault as shown below. We are simply building the tutorial code and then run 'add_person' (This same test runs fine when built with C++ 3.4.0).

Partial core dump is shown below!!
---------------------------------------------
Core was generated by `add_person'.
Program terminated with signal 11, Segmentation fault.
#0  0x0809dbc7 in std::_Rb_tree<std::string, std::pair<std::string const, std::pair<void const*, int> >, std::_Select1st<std::pair<std::string const, std::pair<void const*, int> > >, std::less<std::string>, std::allocator<std::pair<std::string const, std::pair<void const*, int> > > >::insert_unique (this=0x4,
    __v=@0xbfbed9c8)
---------------------------------------------

This is fairly urgent for us and is a show-stopper - could you please comment.

thanks,

Sushil.

Monty Taylor

unread,
Aug 14, 2009, 11:59:09 AM8/14/09
to Sushil Shelly, Kenton Varda, Protocol Buffers
Sushil Shelly wrote:
> Kenton and Team,
>
> We recently moved to using c++ 4.1.1 and are getting a segmentation
> fault as shown below. We are simply building the tutorial code and then
> run 'add_person' (This same test runs fine when built with C++ 3.4.0).

Did you re-build protobuf after upgrading to 4.1.1? C++ doesn't
guarantee binary compatibility in this particular case - so if your
library was built with the old compiler version and the test program
with the new, it may be an issue.

> Partial core dump is shown below!!
> ---------------------------------------------
> Core was generated by `add_person'.
> Program terminated with signal 11, Segmentation fault.
> #0 0x0809dbc7 in std::_Rb_tree<std::string, std::pair<std::string
> const, std::pair<void const*, int> >,
> std::_Select1st<std::pair<std::string const, std::pair<void const*, int>
>> >, std::less<std::string>, std::allocator<std::pair<std::string const,
> std::pair<void const*, int> > > >::insert_unique (this=0x4,
> __v=@0xbfbed9c8)
> ---------------------------------------------
>
> This is fairly urgent for us and is a show-stopper - could you please
> comment..
>
> thanks,
>
> Sushil.
>
> >

Sushil Shelly

unread,
Aug 14, 2009, 12:18:23 PM8/14/09
to Monty Taylor, Kenton Varda, Protocol Buffers
Yea we do a make clean and rebuild to get new libraries, Is there any one actually using C++ 4.1.1?

Monty Taylor

unread,
Aug 14, 2009, 12:33:34 PM8/14/09
to Sushil Shelly, Kenton Varda, Protocol Buffers
Sushil Shelly wrote:
> Yea we do a make clean and rebuild to get new libraries, Is there any
> one actually using C++ 4.1.1?

By C++ 4.1.1 I'm assuming you are using GCC? If so, yes, I use this on
several of the machines in my build farm for Drizzle (which uses
Protobuf quite heavily) with no problems.

If you do not mean GCC, then what compiler are you talking about?

Monty

Kenton Varda

unread,
Aug 14, 2009, 2:19:05 PM8/14/09
to Sushil Shelly, Protocol Buffers
I assume that when you say "C++ 4.1.1", what you mean is "G++ 4.1.1", i.e. GCC 4.1.1's C++ compiler?  Or do you mean some other compiler?  C++ itself does not have version numbers.

I have tested protocol buffers on many different versions of GCC, including both the 3.x and 4.x range.  It seems very unlikely that 4.1.1 in particular doesn't work.

Can you run the tests?  I.e. do "make check" in the top-level protobuf directory.  If the tests pass, then the problem is certainly something with the way you are installing the libraries.  Maybe you installed them to the wrong location, and then when you build the examples you are actually building them against the old version?  The crash looks like something that would happen if you mixed compiler versions.

There's not much more I can say with only one line of a stack trace.  If you can't figure it out, it might help if you provided the whole stack.

Sushil Shelly

unread,
Aug 17, 2009, 6:14:48 PM8/17/09
to Kenton Varda, Protocol Buffers
Folks, sorry for the delayed response to this thread. 

We are currently investigating this issue and assuming the problem to be in our setup and not protocol-buffer libs (using protobuf 2.1.0 for time being).

For clarification we are using G++ 4.1.1 

thanks,

Sushil
Reply all
Reply to author
Forward
0 new messages