<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<STYLE type=text/css>DIV {
        MARGIN: 0px
}
</STYLE>

<META content="MSHTML 6.00.6000.16762" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>FWIW, it seems I can't reproduce the problem with 
current boost svn trunk code, the problem still existed in boost_1_37_0 though. 
I could not spot the changes made that fixed the problem.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I took&nbsp;a look at the shared_ptr aliasing 
constructor, and made a patch to my boost_1_37_0 that solves the problem without 
altering shared_ptr code. All boost.python tests still pass after that. It may 
be useful to someone (the test case from Chad is attached)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>--- 
python_1_37\converter\shared_ptr_from_python.hpp&nbsp;&nbsp;&nbsp; 2008-12-12 
15:49:04.156250000 +0100<BR>+++ python\converter\shared_ptr_from_python.hpp 
2008-12-12 14:24:24.781250000 +0100<BR>@@ -45,10 +45,14 
@@<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (data-&gt;convertible 
== 
source)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
new (storage) 
shared_ptr&lt;T&gt;();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
else<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
{<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
boost::shared_ptr&lt;void&gt; hold_convertible_ref_count( (void*)0, 
shared_ptr_deleter(handle&lt;&gt;(borrowed(source))) 
);<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // use 
aliasing 
constructor<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
new (storage) 
shared_ptr&lt;T&gt;(<BR>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
static_cast&lt;T*&gt;(data-&gt;convertible),<BR>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
shared_ptr_deleter(handle&lt;&gt;(borrowed(source)))<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
hold_convertible_ref_count,<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
static_cast&lt;T*&gt;(data-&gt;convertible)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
);<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
data-&gt;convertible = storage;<BR>&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>---</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>to include the test in python test pass 
:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Index: 
libs/python/test/Jamfile.v2<BR>===================================================================<BR>--- 
libs/python/test/Jamfile.v2 (revision 72)<BR>+++ libs/python/test/Jamfile.v2 
(working copy)<BR>@@ -75,6 +75,7 @@<BR>&nbsp;[ bpl-test return_arg ]<BR>&nbsp;[ 
bpl-test staticmethod ]<BR>&nbsp;[ bpl-test shared_ptr ]<BR>+[ bpl-test 
enable_shared_from_this ]<BR>&nbsp;[ bpl-test andreas_beyer ]<BR>&nbsp;[ 
bpl-test polymorphism ]<BR>&nbsp;[ bpl-test polymorphism2 ]</FONT></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>