Boost logo

Boost :

Subject: [boost] Regression testing on win32 platforms
From: Arash Partow (arash_at_[hidden])
Date: 2010-01-11 05:40:16

Hi all,

With regards to regression testing of boost libraries on the win32 platform using MSVC versions post introduction of checked iterators, are any of the regression tests compiled with the following defines?


As I've noticed MSVC installs with SP1 that have had patches included from the last month or so are causing this failure.

#include <cstddef>
#include <iostream>
#include <string>
#include <boost/regex.hpp>

int main()
    using namespace boost;
    std::string s = "(1)(23)(456)(7890)";
    regex expr("\\(.*?\\)");
    sregex_iterator itr(s.begin(),s.end(),expr);
    sregex_iterator it_end;
    std::string token;
    std::size_t match_count = 0;
    while (it_end != itr)
    std::cout << "Match count: " << match_count << std::endl;
    return 0;

example.exe!_crt_debugger_hook(int _Reserved=3619112) Line 65 C
example.exe!_invalid_parameter(const wchar_t * pszExpression=0x00000000, const wchar_t * pszFunction=0x00000000, const wchar_t * pszFile=0x00000000, unsigned int nLine=0, unsigned int pReserved=0) Line 112 + 0x7 bytes C++
example.exe!_invalid_parameter_noinfo() Line 125 + 0xc bytes C++
example.exe!boost::match_results<std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> >,std::allocator<boost::sub_match<std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> > > > >::set_size() + 0x5b bytes C++
example.exe!boost::re_detail::perl_matcher<std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> >,std::allocator<boost::sub_match<std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char> > > >,boost::regex_traits<char,boost::w32_regex_traits<char> > >::find_imp() + 0xc9 bytes C++

Removing SP1 or applying SP1 with patches up until mid nov '09 slip-streamed seems to work fine, this is just a heads up for people using this particular environment. Initially I was using the BOOST Pro distribution, with static linking (1.39 and 1.40) MT and single modes, I've also done clean builds just in case something was wrong with the distrib, same problem observed in all cases. I've tested the above code on linux with gcc 4.4 and intel v11 runs fine and valgrind checks-out ok (as expected).

BTW I've gone here looking for any kind of documentation relating to the types of settings used, is there a more up-to-date location?

Kind regards,

Boost list run by bdawes at, gregod at, cpdaniel at, john at