Skip to content

heap-use-after-free risk caused by direct deconstruction in factory manager test. #277

@ShannonDing

Description

@ShannonDing
  1. Please tell us about your environment:
  • What is your OS?
    centos7.2
  • What is your client version?
    2.0.1
  • What is your RocketMQ version?
    4.6.0
  1. Other information (e.g. detailed explanation, logs, related issues, suggestions on how to fix, etc):
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions