bug of boost algorithm library or boost asio?
Hi,
Apologize if this is not the right place for this mail.
This program (it has been narrowed down from a larger program) always
crashes after compiled in vs2008 Release(Win32) mode under windows 7. I am
not familiar with assembly code and don't know it's a bug of compiler or
boost::ends_with or boost::asio::buffers_iterator. It can be compiled and
executed with g++ in Ubuntu without any problem.
People said it's very unlikely to be compiler's bug, but when compiled in
debug moded(or disable optimization), the problem does disappear.
I have been stuck with this problem for quite a few hours. Any help is
appreciated. Thanks in advance.
#include <iostream>#include <string>#include
On 31 October 2012 09:05 kpzhang [mailto:sail4dream@gmail.com] wrote :- ...snip...
People said it's very unlikely to be compiler's bug, but when compiled in debug moded(or disable optimization), the problem does disappear. I have been stuck with this problem for quite a few hours. Any help is appreciated. Thanks in advance. ...snip...
Not sure if its any help but just tried compiling this with VS2010 and VS2012
From VS command prompt (with boost version 1.51 pathed into include and lib)
cl test.cpp /EHsc /O2 and resulting test.exe is fine (with or without /O2) So does look like a problem with vs2008 specifically (sorry don't have one available to try any longer) Alex
Hi, I was able to reproduce the error with VS 2008 in both Win32 and x64 compilations. I think it boils down to the fact that the internal state of LINE_END_MARK is changed when LINE_END_MARK.end() is called (even though string::end() pretends to be const, but if you in the standard header "xutility" line 173 there is a C-style cast to get rid of the const). Tobias -- View this message in context: http://boost.2283326.n4.nabble.com/bug-of-boost-algorithm-library-or-boost-a... Sent from the Boost - Users mailing list archive at Nabble.com.
participants (4)
-
Alex Perry
-
Igor R
-
kpzhang
-
Tobias Loew