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 19053f3..2a2e26a 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);
       }