[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Re: Gentoo and 64 bits...

From: Nathaniel Smith
Subject: Re: [Monotone-devel] Re: Gentoo and 64 bits...
Date: Mon, 7 Mar 2005 16:35:27 -0800
User-agent: Mutt/1.5.6+20040907i

On Sun, Mar 06, 2005 at 11:23:58PM +0000, John Yates wrote:
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 16384 (LWP 1082)]
> 0x0000002a960fe820 in memcpy () from /lib/
> (gdb) bt
> #0  0x0000002a960fe820 in memcpy () from /lib/
> #1  0x0000002a95c9dab1 in std::string::append(char const*, unsigned long) () 
> from /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/
> #2  0x00000000006b0ea0 in void boost::io::detail::(anonymous 
> namespace)::mk_str<char, std::char_traits<char> >(std::basic_string<char, 
> std::char_traits<char>, std::allocator<char> >&, char const*, long, long, 
> char, 
> std::_Ios_Fmtflags, char, bool) (address@hidden, beg=0x982fb8 "", size=-1, 
> w=0, 
> fill_char=32 ' ', f=4098, prefix_space=0 '\0', center=false) at 
> feed_args.hpp:73

Well, that's interesting... mk_str is being passed beg="", size=-1.
This (assuming your Boost is reasonably similar to mine) causes it to
call std::string::append("", -1), requesting that the first -1
characters be appended to the std::string in question.  Except,
std::string::append's second argument is unsigned, so we're actually
requesting the first 4294967295 or so bytes of the string "" be
appended... I'm not surprised that ticks off memcpy...

(Oo, but this is x86_64, isn't it; so we might _actually_ be trying to
append the first 18446744073709551615 or so bytes of "".  That isn't
much of an improvement.)

> #3  0x00000000006b0a36 in void boost::io::detail::(anonymous 
> namespace)::put<char, std::char_traits<char>, char (&) [65]>(char (&) [65], 
> boost::io::detail::format_item<char, std::char_traits<char> > const&, 
> std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, 
> boost::io::basic_outsstream<char, std::char_traits<char> >&) (address@hidden, 
> address@hidden, address@hidden, address@hidden) at feed_args.hpp:165

Unfortunately, I can't quite figure out why put() would be feeding
such nonsense to make_str :-/  I guess single-stepping might help...

What version of Boost are you using?

-- Nathaniel

Eternity is very long, especially towards the end.
  -- Woody Allen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]