You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2020/03/14 13:18:39 UTC

[GitHub] [rocketmq-client-cpp] WoodsCumming opened a new pull request #274: Fix the heap-use-after-free risk caused by direct deconstruction when…

WoodsCumming opened a new pull request #274: Fix the heap-use-after-free risk caused by direct deconstruction when…
URL: https://github.com/apache/rocketmq-client-cpp/pull/274
 
 
   … it is not used after initialization.
   
   ## What is the purpose of the change
   
   Fix the heap-use-after-free risk caused by direct deconstruction when it is not used after initialization.
   
   ## Brief changelog
   
   Fix the heap-use-after-free risk caused by direct deconstruction when it is not used after initialization.
   
   ## Verifying this change
   
   Want a code review.
   
   ## The ASAN Report
   
   [==========] Running 2 tests from 1 test case.
   [----------] Global test environment set-up.
   [----------] 2 tests from MQClientManagerTest
   [ RUN      ] MQClientManagerTest.getClientFactory
   =================================================================
   ==124436==ERROR: AddressSanitizer: heap-use-after-free on address 0x6110000096f8 at pc 0x7efe51699cba bp 0x7efe4bdfac20 sp 0x7efe4bdfac18
   WRITE of size 8 at 0x6110000096f8 thread T4 (RemotingAsioT)
   [       OK ] MQClientManagerTest.getClientFactory (14 ms)
   [ RUN      ] MQClientManagerTest.removeClientFactory
   [       OK ] MQClientManagerTest.removeClientFactory (0 ms)
   [----------] 2 tests from MQClientManagerTest (14 ms total)
   
   [----------] Global test environment tear-down
   [==========] 2 tests from 1 test case ran. (14 ms total)
   [  PASSED  ] 2 tests.
   
   Follow this checklist to help us incorporate your contribution quickly and easily. Notice, `it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR`.
   
   - [x] Make sure there is a [Github issue](https://github.com/apache/rocketmq/issues) filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue. 
   - [x] Format the pull request title like `[ISSUE #123] Fix UnknownException when host config not exist`. Each commit in the pull request should have a meaningful subject line and body.
   - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when a cross-module dependency exists.
   - [ ] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas).
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [rocketmq-client-cpp] ShannonDing merged pull request #274: Fix the heap-use-after-free risk caused by direct deconstruction when it is not used after initialization.

Posted by GitBox <gi...@apache.org>.
ShannonDing merged pull request #274: Fix the heap-use-after-free risk caused by direct deconstruction when it is not used after initialization.
URL: https://github.com/apache/rocketmq-client-cpp/pull/274
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [rocketmq-client-cpp] codecov-io commented on issue #274: Fix the heap-use-after-free risk caused by direct deconstruction when it is not used after initialization.

Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #274: Fix the heap-use-after-free risk caused by direct deconstruction when it is not used after initialization.
URL: https://github.com/apache/rocketmq-client-cpp/pull/274#issuecomment-599061528
 
 
   # [Codecov](https://codecov.io/gh/apache/rocketmq-client-cpp/pull/274?src=pr&el=h1) Report
   > Merging [#274](https://codecov.io/gh/apache/rocketmq-client-cpp/pull/274?src=pr&el=desc) into [master](https://codecov.io/gh/apache/rocketmq-client-cpp/commit/753ec41b741cf758b4a6d87dc8976aea2b2ec225&el=desc) will **increase** coverage by `0.26%`.
   > The diff coverage is `50.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/rocketmq-client-cpp/pull/274/graphs/tree.svg?width=650&height=150&src=pr&token=L5As3jdqFW)](https://codecov.io/gh/apache/rocketmq-client-cpp/pull/274?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #274      +/-   ##
   ==========================================
   + Coverage   58.28%   58.54%   +0.26%     
   ==========================================
     Files         182      182              
     Lines       11805    11810       +5     
   ==========================================
   + Hits         6880     6914      +34     
   + Misses       4925     4896      -29     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq-client-cpp/pull/274?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [src/MQClientFactory.cpp](https://codecov.io/gh/apache/rocketmq-client-cpp/pull/274/diff?src=pr&el=tree#diff-c3JjL01RQ2xpZW50RmFjdG9yeS5jcHA=) | `22.90% <44.44%> (+2.12%)` | :arrow_up: |
   | [test/src/MQClientManagerTest.cpp](https://codecov.io/gh/apache/rocketmq-client-cpp/pull/274/diff?src=pr&el=tree#diff-dGVzdC9zcmMvTVFDbGllbnRNYW5hZ2VyVGVzdC5jcHA=) | `100.00% <100.00%> (ø)` | |
   | [src/MQClientAPIImpl.cpp](https://codecov.io/gh/apache/rocketmq-client-cpp/pull/274/diff?src=pr&el=tree#diff-c3JjL01RQ2xpZW50QVBJSW1wbC5jcHA=) | `24.89% <0.00%> (+0.41%)` | :arrow_up: |
   | [src/transport/TcpRemotingClient.cpp](https://codecov.io/gh/apache/rocketmq-client-cpp/pull/274/diff?src=pr&el=tree#diff-c3JjL3RyYW5zcG9ydC9UY3BSZW1vdGluZ0NsaWVudC5jcHA=) | `13.76% <0.00%> (+4.49%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/rocketmq-client-cpp/pull/274?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/rocketmq-client-cpp/pull/274?src=pr&el=footer). Last update [753ec41...b79abb4](https://codecov.io/gh/apache/rocketmq-client-cpp/pull/274?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services