You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@celix.apache.org by "PengZheng (via GitHub)" <gi...@apache.org> on 2023/05/07 04:09:32 UTC

[PR] Hotfix/coverity fix (celix)

PengZheng opened a new pull request, #546:
URL: https://github.com/apache/celix/pull/546

   This PR fixes a subtle thread safety issue and a trivial null dereference.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Hotfix/coverity fix (celix)

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #546:
URL: https://github.com/apache/celix/pull/546#issuecomment-1537285532

   ## [Codecov](https://app.codecov.io/gh/apache/celix/pull/546?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#546](https://app.codecov.io/gh/apache/celix/pull/546?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7b432d2) into [master](https://app.codecov.io/gh/apache/celix/commit/4281d76581bb6c4ea9c869c02c1cef732f1e055b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4281d76) will **increase** coverage by `0.06%`.
   > The diff coverage is `94.44%`.
   
   > :exclamation: Current head 7b432d2 differs from pull request most recent head d538438. Consider uploading reports for the commit d538438 to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #546      +/-   ##
   ==========================================
   + Coverage   77.48%   77.54%   +0.06%     
   ==========================================
     Files         226      226              
     Lines       34642    34641       -1     
   ==========================================
   + Hits        26841    26864      +23     
   + Misses       7801     7777      -24     
   ```
   
   
   | [Impacted Files](https://app.codecov.io/gh/apache/celix/pull/546?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [libs/framework/src/service\_tracker.c](https://app.codecov.io/gh/apache/celix/pull/546?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlicy9mcmFtZXdvcmsvc3JjL3NlcnZpY2VfdHJhY2tlci5j) | `78.07% <85.71%> (-0.05%)` | :arrow_down: |
   | [bundles/shell/shell/src/c\_shell\_activator.c](https://app.codecov.io/gh/apache/celix/pull/546?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnVuZGxlcy9zaGVsbC9zaGVsbC9zcmMvY19zaGVsbF9hY3RpdmF0b3IuYw==) | `90.32% <100.00%> (ø)` | |
   
   ... and [6 files with indirect coverage changes](https://app.codecov.io/gh/apache/celix/pull/546/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Hotfix/coverity fix (celix)

Posted by "PengZheng (via GitHub)" <gi...@apache.org>.
PengZheng commented on code in PR #546:
URL: https://github.com/apache/celix/pull/546#discussion_r1186779336


##########
libs/framework/src/service_tracker.c:
##########
@@ -539,12 +538,12 @@ static celix_status_t serviceTracker_untrack(service_tracker_t* tracker, service
     if (remove != NULL) {
         serviceTracker_untrackTracked(tracker, remove, size, true);

Review Comment:
   `remove` might be freed in `serviceTracker_untrackTracked`. Thus it's not reliable to use its value, which might be reassigned to a new `celix_tracked_entry_t` and be added to `untrackingServices` for a second time, in `celix_arrayList_remove(tracker->untrackingServices, remove)`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Hotfix/coverity fix (celix)

Posted by "PengZheng (via GitHub)" <gi...@apache.org>.
PengZheng commented on code in PR #546:
URL: https://github.com/apache/celix/pull/546#discussion_r1186779336


##########
libs/framework/src/service_tracker.c:
##########
@@ -539,12 +538,12 @@ static celix_status_t serviceTracker_untrack(service_tracker_t* tracker, service
     if (remove != NULL) {
         serviceTracker_untrackTracked(tracker, remove, size, true);

Review Comment:
   `remove` might be free in `serviceTracker_untrackTracked`. 



##########
libs/framework/src/service_tracker.c:
##########
@@ -539,12 +538,12 @@ static celix_status_t serviceTracker_untrack(service_tracker_t* tracker, service
     if (remove != NULL) {
         serviceTracker_untrackTracked(tracker, remove, size, true);

Review Comment:
   `remove` might be freed in `serviceTracker_untrackTracked`. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Hotfix/coverity fix (celix)

Posted by "PengZheng (via GitHub)" <gi...@apache.org>.
PengZheng merged PR #546:
URL: https://github.com/apache/celix/pull/546


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org