- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am getting underflow exception in release more, but not in debug mode. This is what causing the error:
My platform is WinXP 32, Visual Studio 2008, tbb30_104oss with binaries downloaded from TBB website.
[cpp]#includeunsigned int fp_control_state = _controlfp(_EM_INEXACT, _MCW_EM); struct Element { std::vector data; double x, y; }; tbb::concurrent_vector v; // this fails with FP exception Element& e = *v.push_back(Element()); // stepping inside with the debugger leads to the line 890 in concurent_vector.h void init(const void *src) { for(; i < n; ++i) new( &array ) T(*static_cast (src)); } [/cpp]
My platform is WinXP 32, Visual Studio 2008, tbb30_104oss with binaries downloaded from TBB website.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does this happen in a single threaded mode, or the application uses other TBB constructs too?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Upon the second thought, the exception may happen because of copying garbage in Element::x and Element::y members.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks like it is because of copying garbage. Default constructor which sets structure fields to 0 fixed the problem.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page