You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by jpeach <gi...@git.apache.org> on 2016/09/15 19:03:46 UTC

[GitHub] trafficserver pull request #1025: TS-4872: Fix clang-analyzer leak error on ...

GitHub user jpeach opened a pull request:

    https://github.com/apache/trafficserver/pull/1025

    TS-4872: Fix clang-analyzer leak error on LogObject.cc _checkout_write.

    We could not quite figure out why it reports this (smells almost like a bug in clang-analyzer), but some refactoring that avoids the warning, and cleans up the code overall.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jpeach/trafficserver fix/4872

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/1025.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1025
    
----

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #1025: TS-4872: Fix clang-analyzer leak error on LogObje...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:

    https://github.com/apache/trafficserver/pull/1025
  
    Linux build *successful*! See https://ci.trafficserver.apache.org/job/Github-Linux/714/ for details.
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #1025: TS-4872: Fix clang-analyzer leak error on LogObje...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:

    https://github.com/apache/trafficserver/pull/1025
  
    FreeBSD build *successful*! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/818/ for details.
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #1025: TS-4872: Fix clang-analyzer leak error on LogObje...

Posted by PSUdaemon <gi...@git.apache.org>.
Github user PSUdaemon commented on the issue:

    https://github.com/apache/trafficserver/pull/1025
  
    [approve ci]


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request #1025: TS-4872: Fix clang-analyzer leak error on ...

Posted by PSUdaemon <gi...@git.apache.org>.
Github user PSUdaemon commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/1025#discussion_r79040648
  
    --- Diff: proxy/logging/LogObject.cc ---
    @@ -354,6 +354,38 @@ LogObject::display(FILE *fd)
       fprintf(fd, "++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
     }
     
    +static head_p
    +increment_pointer_version(volatile head_p *dst)
    +{
    +  head_p h;
    +  head_p new_h;
    +
    +  do {
    +    INK_QUEUE_LD(h, *dst);
    +    SET_FREELIST_POINTER_VERSION(new_h, FREELIST_POINTER(h), FREELIST_VERSION(h) + 1);
    +  } while (ink_atomic_cas(&dst->data, h.data, new_h.data) == false);
    +
    +  return h;
    +}
    +
    +static bool
    +write_pointer_value(volatile head_p *dst, head_p old_h, void *ptr)
    +{
    +  head_p tmp_h;
    +
    +  SET_FREELIST_POINTER_VERSION(tmp_h, ptr, 0);
    +  return ink_atomic_cas(&dst->data, old_h.data, tmp_h.data);
    +}
    +
    +static bool
    +write_pointer_value_vers(volatile head_p *dst, head_p old_h, void *ptr, head_p::version_type vers)
    +{
    +  head_p tmp_h;
    +
    +  SET_FREELIST_POINTER_VERSION(tmp_h, ptr, vers);
    +  return ink_atomic_cas(&dst->data, old_h.data, tmp_h.data);
    +}
    --- End diff --
    
    Can these two functions be merged? Seems like `write_pointer_value` can just call `write_pointer_value_vers` with `0` for the version?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request #1025: TS-4872: Fix clang-analyzer leak error on ...

Posted by jpeach <gi...@git.apache.org>.
Github user jpeach closed the pull request at:

    https://github.com/apache/trafficserver/pull/1025


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #1025: TS-4872: Fix clang-analyzer leak error on LogObje...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:

    https://github.com/apache/trafficserver/pull/1025
  
    Linux build *failed*! See https://ci.trafficserver.apache.org/job/Github-Linux/712/ for details.
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #1025: TS-4872: Fix clang-analyzer leak error on LogObje...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:

    https://github.com/apache/trafficserver/pull/1025
  
    Linux build *successful*! See https://ci.trafficserver.apache.org/job/Github-Linux/711/ for details.
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #1025: TS-4872: Fix clang-analyzer leak error on LogObje...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:

    https://github.com/apache/trafficserver/pull/1025
  
    FreeBSD build *successful*! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/815/ for details.
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #1025: TS-4872: Fix clang-analyzer leak error on LogObje...

Posted by PSUdaemon <gi...@git.apache.org>.
Github user PSUdaemon commented on the issue:

    https://github.com/apache/trafficserver/pull/1025
  
    Ran clang-analyzer locally:
    > scan-build: No bugs found.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #1025: TS-4872: Fix clang-analyzer leak error on LogObje...

Posted by zwoop <gi...@git.apache.org>.
Github user zwoop commented on the issue:

    https://github.com/apache/trafficserver/pull/1025
  
    Should we land this?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #1025: TS-4872: Fix clang-analyzer leak error on LogObje...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:

    https://github.com/apache/trafficserver/pull/1025
  
    FreeBSD build *successful*! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/816/ for details.
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---