Skip to content

memory leak in butil::ObjectPoolAllocator #2724

Description

@live4thee

Describe the bug (描述bug)

When using butil::ObjectPoolAllocator to construct butil::MPSCQueue. The returned pointer will be accidentally saved in a object pool of void pointers.

To Reproduce (复现方法)

Construct butil::MPSCQueue with butil::ObjectPoolAllocator, and check memory consumption.

Expected behavior (期望行为)

No memory leak.

Versions (各种版本)
OS: ALL supported OS.
Compiler: ALL supported compiler.
brpc: bRPC version after MPSQ was introduced.
protobuf: ALL supported version.

Additional context/screenshots (更多上下文/截图)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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