Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4636: Run-Time Check Failure #1 in feed_args.hpp using Visual Studio 2010
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-10-11 18:56:14
#4636: Run-Time Check Failure #1 in feed_args.hpp using Visual Studio 2010
-------------------------------------+-------------------------------------
Reporter: Rüdiger Brünner | Owner: James E. King, III
<rbruenner@â¦> |
Type: Bugs | Status: new
Milestone: To Be Determined | Component: format
Version: Boost 1.43.0 | Severity: Problem
Resolution: | Keywords: format Run-Time Check
| Failure VS2010
-------------------------------------+-------------------------------------
Changes (by James E. King, III):
* owner: Samuel Krempp => James E. King, III
Comment:
I am looking into this.
Event without /RTCsuc I am able to see the same thing using a numeric_cast
as follows:
{{{
size_type res_size = (std::min)(
numeric_cast<size_type>(specs.truncate_) - !!prefix_space,
buf.pcount() );
}}}
Which results in the error:
class boost::numeric::positive_overflow: bad numeric conversion: positive
overflow
Inspecting it in the debugger I see:
{{{
- specs {argN_=0 res_="" appendix_="00" ...} const
boost::io::detail::format_item<char,std::char_traits<char>,std::allocator<char>
> &
argN_ 0 int
+ res_ ""
std::basic_string<char,std::char_traits<char>,std::allocator<char> >
+ appendix_ "00"
std::basic_string<char,std::char_traits<char>,std::allocator<char> >
+ fmtstate_ {width_=0 precision_=6 fill_=32 ' ' ...}
boost::io::detail::stream_format_state<char,std::char_traits<char> >
truncate_ 9223372036854775807 __int64
pad_scheme_ 0 unsigned int
}}}
The offending test is in format_test1.cpp:
{{{
if(str( format("%%##%%##%%1 %1%00") % "Escaped OK" ) != "%##%##%1
Escaped OK00")
}}}
At first glance I would say that the value of truncate_ is wrong here, and
figuring that out will end up being the root cause.
-- Ticket URL: <https://svn.boost.org/trac10/boost/ticket/4636#comment:15> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-10-11 19:02:49 UTC