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: [email protected] With regards, Apache Git Services
