monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] unit_tests.exe crashing on windows vista when build wit


From: Kelly F. Hickel
Subject: [Monotone-devel] unit_tests.exe crashing on windows vista when build with visual studio 2005 (vs8)
Date: Sat, 14 Jul 2007 11:41:46 -0500

Hi all,

                I’ve got a build slave setup for vs2005 on vista ( build slave name is i686-winvista-vs2005 at http://monotone.ca/buildbot/ ). The unit tests are crashing during the cset:basic_csets test (The tests previous to this test passed).

 

The code in cset.cc leading to this crash is the cs.nodes_deleted.insert(foo) below:

  {

    L(FL("TEST: cset delete"));

    setup_roster(r, f1, nis);

    cset cs; MM(cs);

    cs.nodes_deleted.insert(foo_bar);

    cs.nodes_deleted.insert(foo);

    UNIT_TEST_CHECK_NOT_THROW(cs.apply_to(tree), logic_error);

    UNIT_TEST_CHECK(r.all_nodes().size() == 1); // only the root left

  }

 

It’s crashing in xtree, in the insert function in the first iteration of the while loop below, on the line _Addleft = _DEBUG_LT_PRED(…:

 

      _Pairib insert(const value_type& _Val)

            {     // try to insert node with value _Val

            _Nodeptr _Trynode = _Root();

            _Nodeptr _Wherenode = _Myhead;

            bool _Addleft = true;   // add to left of head if tree empty

            while (!_Isnil(_Trynode))

                  {     // look for leaf to insert before (_Addleft) or after

                  _Wherenode = _Trynode;

                  _Addleft = _DEBUG_LT_PRED(this->comp,

                        this->_Kfn(_Val), _Key(_Trynode));

                  _Trynode = _Addleft ? _Left(_Trynode) : _Right(_Trynode);

                  }

 

This is the def of _DEBUG_LT_PRED:

#define _DEBUG_LT_PRED(pred, x, y)  pred(x, y)

 

 

We end up in the function below, crashing on the third iteration of the while loop below:

// the ordering on file_path is not exactly that of strings.

  // see the "ordering" unit test in paths.cc.

  bool operator <(const file_path & other) const

  {

    std::string::const_iterator p = data.begin();

    std::string::const_iterator plim = data.end();

    std::string::const_iterator q = other.data.begin();

    std::string::const_iterator qlim = other.data.end();

 

    while (*p == *q && p != plim && q != qlim)

      p++, q++;

 

 

Before the while loop, the locals are:

-           this  0x0012fc40  const file_path * const

-           any_path    {data="" }     any_path

-           data  "foo" std::basic_string<char,std::char_traits<char>,std::allocator<char> >

-           [actual members]  {_Bx={...} _Mysize=3 _Myres=15 }      std::basic_string<char,std::char_traits<char>,std::allocator<char> >

+           std::_String_val<char,std::allocator<char> >    {_Alval={...} }      std::_String_val<char,std::allocator<char> >

+           _Bx   {_Buf=0x0012fc44 "foo" _Ptr=0x006f6f66 "ÃÌÌÌÌÌÌÌÌÌ¡¸mŠ" }      std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Bxty

            _Mysize     3     unsigned int

            _Myres      15    unsigned int

            [0]   102 'f'     char

            [1]   111 'o'     char

            [2]   111 'o'     char

-           other {...} const file_path &

-           any_path    {data="" } any_path

-           data  "foo/bar"      std::basic_string<char,std::char_traits<char>,std::allocator<char> >

-           [actual members]  {_Bx={...} _Mysize=7 _Myres=15 }      std::basic_string<char,std::char_traits<char>,std::allocator<char> >

+           std::_String_val<char,std::allocator<char> >    {_Alval={...} }      std::_String_val<char,std::allocator<char> >

+           _Bx   {_Buf=0x01510f78 "foo/bar" _Ptr=0x2f6f6f66 <Bad Ptr> }      std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Bxty

            _Mysize     7     unsigned int

            _Myres      15    unsigned int

            [0]   102 'f'     char

            [1]   111 'o'     char

            [2]   111 'o'     char

            [3]   47 '/'      char

            [4]   98 'b'      char

            [5]   97 'a'      char

            [6]   114 'r'     char

+           plim  0x0012fc40 ""      std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> >

+           q     0x01510f74 "

ð­ºfoo/bar" std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> >

+           qlim  0x01510f74 "

ð­ºfoo/bar" std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> >

+           p     0x0012fc40 ""      std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> >

 

 

I know very little (ok, nothing) about the monotone code, I just offered to set up a vs8 buildbot.  I’m willing to spend some time on this, but probably not enough to really understand what’s going on here.

 

Any ideas?

 

 

--

 

Kelly F. Hickel
Senior Product Architect
MQSoftware, Inc
.
952-345-8677 Office
952-345-8721 Fax
address@hidden
www.mqsoftware.com

See Business Work

 


reply via email to

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