Opened 11 years ago
Closed 11 years ago
#5759 closed Bugs (worksforme)
Enabling -std=c++0x causes random crashes in ASIO since Boost 1.47.0
Reported by: | Owned by: | chris_kohlhoff | |
---|---|---|---|
Milestone: | To Be Determined | Component: | asio |
Version: | Boost 1.47.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Hello,
to start off, I know that this bug report sucks. But I haven't been able to make a simple test case that would exhibit the bug and wouldn't require you to have other libs installed, so this will have to suffice.
I'm working on a project that uses both Rasterbar libtorrent and Pion Network libraries. They both use Boost ASIO. The problem is that if the following conditions are met, the resulting binary starts crashing randomly inside of the ASIO code:
- Boost 1.47.0 is used (previous versions work fine!)
-std=c++0x
is used- Pion Network header files are included in any of the compiled source files (just including suffices!)
Please, install Rasterbar libtorrent and Pion Network and try compiling the attached file. First without -std=c++0x
and then with -std=c++0x
. The latter will make the binary crash.
I suppose this is caused by the newly introduced move constructors. But I'm not sure whether this is an ASIO or a GCC bug.
Attachments (1)
Change History (2)
by , 11 years ago
comment:1 by , 11 years ago
Resolution: | → worksforme |
---|---|
Severity: | Regression → Problem |
Status: | new → closed |
I suspect from your description that one or more of the components (e.g. libpion) has not been compiled with the -std=c++0x compiler option. You need to make sure everything is compiled with -std=c++0x. If you do so, it works.
Example program