clover: Define non-templated copy constructor for clover::ref_ptr.

The templated copy constructor doesn't prevent the compiler from
emitting a default copy constructor, which leads to inconsistent
memory handling and was reported to cause segfaults when doing event
manipulation.

Reported-by: Tom Stellard <thomas.stellard@amd.com>
This commit is contained in:
Francisco Jerez
2012-06-28 01:16:23 +02:00
parent db2b6ca504
commit c6bb41c28b
@@ -88,8 +88,7 @@ namespace clover {
reset(q);
}
template<typename S>
ref_ptr(const ref_ptr<S> &ref) : p(NULL) {
ref_ptr(const ref_ptr<T> &ref) : p(NULL) {
reset(ref.p);
}