Opened 10 years ago
Closed 9 years ago
#8391 closed Bugs (fixed)
boost::local_time::tz_database::load_from_file uses unchecked iterator
Reported by: | Owned by: | Marshall Clow | |
---|---|---|---|
Milestone: | Boost 1.54.0 | Component: | date_time |
Version: | Boost 1.53.0 | Severity: | Showstopper |
Keywords: | Cc: | frank@… |
Description
Program exits with:
/usr/local/include/boost/token_iterator.hpp:56: const Type& boost::token_iterator<TokenizerFunc, Iterator, Type>::dereference() const [with TokenizerFunc = boost::char_separator<char, std::char_traits<char> >, Iterator = gnu_cxx::normal_iterator<const char*, std::basic_string<char> >, Type = std::basic_string<char>]: Assertion `valid_' failed.
/boost/date_time/tz_db_base.hpp:
tokenizer_iterator tok_iter = tokens.begin();
tok_iter should be verified before using atoi().
Attachments (3)
Change History (10)
by , 10 years ago
comment:1 by , 10 years ago
Milestone: | To Be Determined → Boost 1.54.0 |
---|---|
Severity: | Problem → Showstopper |
comment:2 by , 10 years ago
Cc: | added |
---|
comment:3 by , 9 years ago
Owner: | changed from | to
---|
When I run this test, I get execption: bad lexical cast: source type value could not be interpreted as target, and applying the supplied patch does not change this.
I agree there's a problem here, and I think that the code you're patching can be made more robust, but the bug that your code is triggering is (I think) not the one that your patch fixes.
Then again, I'm not running in gcc debug mode.
comment:4 by , 9 years ago
I am not able to get the same execption (bad lexical cast). Always crashes with "Assertion `valid_' failed."
Tested with 1.53, 1.54_beta0 and trunk (r84644).
Compiled using: g++ -I ../boost_1_53_0 ./main.cpp -o ./bin/bug_boost_153 Version: gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)
comment:7 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
test program