trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bc...@apache.org
Subject [trafficserver] 03/03: Clang-Analyzer: Fix false positive in IntrusivePtr. Related to 40f01aa0c4fb2ab72459dcc16d63989f40bb8b9b.
Date Wed, 06 Jun 2018 20:22:12 GMT
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit eb299ca22e238aea6211c23059ec7fb7ff0f9e99
Author: Alan M. Carroll <amc@apache.org>
AuthorDate: Sat Jun 2 09:29:55 2018 -0500

    Clang-Analyzer: Fix false positive in IntrusivePtr.
    Related to 40f01aa0c4fb2ab72459dcc16d63989f40bb8b9b.
    
    (cherry picked from commit 2183065f8f4597b4a6d78ad1995ef5a5df119b24)
---
 lib/tsconfig/IntrusivePtr.h | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/lib/tsconfig/IntrusivePtr.h b/lib/tsconfig/IntrusivePtr.h
index 93be87b..93370f3 100644
--- a/lib/tsconfig/IntrusivePtr.h
+++ b/lib/tsconfig/IntrusivePtr.h
@@ -502,20 +502,8 @@ void
 IntrusivePtr<T>::unset()
 {
   if (nullptr != m_obj) {
-    /* magic: our target is required to inherit from IntrusivePtrCounter,
-     * which provides a protected counter variable and access via our
-     * super class. We call the super class method to get a raw pointer
-     * to the counter variable.
-     */
     auto &cp = m_obj->m_intrusive_pointer_reference_count;
 
-    /* If you hit this assert you've got a cycle of objects that
-       reference each other. A delete in the cycle will eventually
-       result in one of the objects getting deleted twice, which is
-       what this assert indicates.
-    */
-    assert(cp);
-
     if (0 == --cp) {
       IntrusivePtrPolicy<T>::finalize(m_obj);
     }

-- 
To stop receiving notification emails like this one, please contact
bcall@apache.org.

Mime
View raw message