clover: Define non-templated copy constructor for clover::ref_ptr.
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 27 Jun 2012 23:16:23 +0000 (01:16 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Sun, 1 Jul 2012 13:37:30 +0000 (15:37 +0200)
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>
src/gallium/state_trackers/clover/core/base.hpp

index 19053f392353d9c7b183bdd127dce3830e377487..2a2e26a141a692177885ef049f7b28581d7c8cb3 100644 (file)
@@ -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);
       }