>
> I run .libs/simple1
> and have the following things:
> Query: select * from stock
> Segmentation fault (core dumped)
> #0 0x0063a2a9 in ResUse (this=0xbfffd9c4, result=0xbfffd9e0, m=0x0) at
> char_traits.h:135
As Chris said, this looks like it's in the std library; and it is, but
this is at a point where it is, I think, trying to copy a string. It's a
little hard to tell, because gdb is skipping a few steps (due to
inlining, I imagine). Still, I can tell that it's happening during the
constructor for ResUse, when it's creating the Result.
> #1 0x0063261c in mysqlpp::Connection::store (this=0xbfffdb70,
> str=@0xffffffff, throw_excptns=true) at result.h:157
str=@0xffffffff -- Warren, Chris, am I on crack, but isn't 0xffffffff
not a place one could put a string? In tracing the code, this should be
a copy of the string produced by the Query object's stringstream. I'm
wondering, though, if the problem might be related to std::string not
actually coping the string, but instead trying to do some cute little
sharing stuff; but then the stringstream cleans up its own string? I
dunno. That's kind of grasping at straws, but I can't see any other
reason for that string to become invalid.
For what it's worth, I actually have seen similar errors in the past,
but I'd fixed them by using a different method. I'm thinking now maybe I
should go back and see if I can replicate the error I was having and
doing a more exhaustive study using valgrind.