Hey Philippe,

Philippe Tillet <phil.til...@gmail.com>
writes:
> I wrote the shared_ptr some years ago (inspired by some code found on the
> internet), so it's not impossible that a couple of bugs sneaked in. The
> first thing to do is to use C++11 and to replace the whole content of
> viennacl/tools/shared_ptr.hpp by:
>
> template<class T> using shared_ptr = std::shared_ptr<T>;
>
> and see if the problem is still here ^^


I tried that, and the errors remain basically the same, so that pretty
much rules out that source of bugs.

Looking more closely at the backtrace isn't particularly illuminating:

#23 0x00000000004c9624 in do_call (nk=<optimised out>, na=<optimised out>, 
pp_stack=0x7fffffffd630, func=<type at remote 0x91e100>) at 
../Python/ceval.c:4241
#24 call_function (oparg=<optimised out>, pp_stack=0x7fffffffd630) at 
../Python/ceval.c:4044
#25 PyEval_EvalFrameEx (
    f=f@entry=Frame 0x10c4910, for file 
/home/toby/src/viennacl/pyviennacl-dev/build/pyviennacl/build/lib.linux-x86_64-2.7/pyviennacl/pycore.py,
 line 805, in __setitem__ (self=<Vector(dtype=<numpy.dtype at remote 
0x7ffff6bb4a00>, vcl_leaf=<vector_float at remote 0x11240a8>, shape=(44,), 
statement_node_numeric_type=<statement_node_numeric_type at remote 0x107d810>, 
internal_size=128, size=44) at remote 0x111d8d0>, key=<slice at remote 
0x1113800>, value=<Vector(dtype=<numpy.dtype at remote 0x7ffff6bb4a00>, 
vcl_leaf=<vector_float at remote 0x1124050>, shape=(11,), 
statement_node_numeric_type=<...>, internal_size=128, size=11) at remote 
0x111d890>), 
    throwflag=throwflag@entry=0) at ../Python/ceval.c:2666

So clearly Python thinks that the vector_float object can be
garbage-collected at this point, but it's not clear why it would have
been freed already, except in some relation to the way I've restructured
the code, and its impact on the scope of the pointer...

I suppose I'll sleep on it, but it may have to wait till the new year.


Cheers,

Toby


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
ViennaCL-devel mailing list
ViennaCL-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viennacl-devel

Reply via email to