Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost][thread] Future returning 0xfeeefeee
From: Klaim - Joël Lamotte (mjklaim_at_[hidden])
Date: 2013-04-06 18:18:39


I just replaced boost::future/promise by std::future/promise and the test
just works.
However the same change in a real code using WorkQueue internally and using
similar code to the test
makes the future::get() provide invalid pointers with values close to
0x000000 but not exactly.
This code then makes access violation as the pointers are obviously not
valid.

So far I know:

 - having a std::vector instead of tbb::concurrent_queue makes the test
work (the real code can't use std::vector, it's concurrent);
 - using std::future/promise instead of boost::future/promise makes the
test work ...;
 - ...but not the real code (which should be almost the same than the test);

My current suspicion: maybe I do something wrong with the lifetime of the
promise?
I don't see what unfortunately.

I'll try to reproduce the problem with std::future/promise I see in my real
code but in the test.

Joel Lamotte



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net