[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] unit_tests.exe crashing on windows vista when build
From: |
Richard Levitte |
Subject: |
Re: [Monotone-devel] unit_tests.exe crashing on windows vista when build with visual studio 2005 (vs8) |
Date: |
Sun, 15 Jul 2007 01:50:48 +0200 (CEST) |
In message <address@hidden> on Sat, 14 Jul 2007 11:41:46 -0500, "Kelly F.
Hickel" <address@hidden> said:
kfh> Hi all,
kfh>
kfh> I’ve got a build slave setup for vs2005 on vista ( build
slave name is i686-winvista-vs2005
<http://monotone.ca/buildbot/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).
[...]
kfh> We end up in the function below, crashing on the third iteration of the
while loop below:
kfh>
kfh> // the ordering on file_path is not exactly that of strings.
kfh>
kfh> // see the "ordering" unit test in paths.cc.
kfh>
kfh> bool operator <(const file_path & other) const
kfh>
kfh> {
kfh>
kfh> std::string::const_iterator p = data.begin();
kfh>
kfh> std::string::const_iterator plim = data.end();
kfh>
kfh> std::string::const_iterator q = other.data.begin();
kfh>
kfh> std::string::const_iterator qlim = other.data.end();
kfh>
kfh>
kfh>
kfh> while (*p == *q && p != plim && q != qlim)
kfh>
kfh> p++, q++;
I think the test expression needs to be reordered. It's a bit silly
to check for content equality BEFORE checking if the end has been
reached.
Fixed in a few minutes.
Cheers,
Richard
-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.
--
Richard Levitte address@hidden
http://richard.levitte.org/
"When I became a man I put away childish things, including
the fear of childishness and the desire to be very grown up."
-- C.S. Lewis