[shared_ptr][repost] Ticket 2126 status?

Andrey Semashev:
Is the ticket 2126:
http://svn.boost.org/trac/boost/ticket/2126
actually fixed in trunk? The ticket is still open, but my code
Sorry to reiterate, but I think this issue is rather critical and it would be very nice to have it solved in the upcoming release. Peter, have you reviewed the patch I attached? I also attached it to the ticket. Peter Dimov wrote: that uses
enable_shared_from_this and make_shared runs fine on trunk.
Interesting. No, I don't believe that trunk is OK. The constructor support just masks the problem. Try for example the following test:
I tried to dig the code here and there. It seems like calling sp_accept_owner for the constructed object would settle the problem. I modified make_shared.hpp accordingly and tried your test on Linux (GCC 4.3), and it passed without errors. I also tried the make_shared_test.cpp test and it also passed. Please, find the patch attached. Is it valid?

Andrey Semashev:
Sorry to reiterate, but I think this issue is rather critical and it would be very nice to have it solved in the upcoming release.
Peter, have you reviewed the patch I attached?
Yes, I have reviewed your patch. I don't want to merge the current shared_ptr, on which your patch depends. (Not at this time, at least). I also think that your patch stands to be improved a bit, but obviously, this is of secondary concern. (In addition, I prefer to add tests that identify the failure either before, or in concert with, commiting a fix.) If this issue is considered important enough to block the release, I'll see what I can do to unblock it. But keep in mind that (a) make_shared is still undocumented and (b) the release branch throws bad_weak_ptr instead of silently doing Bad Things.

On Sun, Oct 19, 2008 at 5:46 PM, Peter Dimov <pdimov@pdimov.com> wrote:
Andrey Semashev:
Sorry to reiterate, but I think this issue is rather critical and it would be very nice to have it solved in the upcoming release.
Peter, have you reviewed the patch I attached?
Yes, I have reviewed your patch.
I don't want to merge the current shared_ptr, on which your patch depends. (Not at this time, at least). I also think that your patch stands to be improved a bit, but obviously, this is of secondary concern.
(In addition, I prefer to add tests that identify the failure either before, or in concert with, commiting a fix.)
If this issue is considered important enough to block the release, I'll see what I can do to unblock it.
AFAICS, it isn't a showstopper. I'd rather have you work on it as part of your regular shared_ptr maintenance.
But keep in mind that (a) make_shared is still undocumented
Given its advantages, I hope you can document make_shared soon:-) Thanks, --Beman
participants (3)
-
Andrey Semashev
-
Beman Dawes
-
Peter Dimov