Skip to content

Invalide free for msgpack future. #1

@absolute8511

Description

@absolute8511

screen shot 2013-09-08 at 6 04 02 pm

After some review on the source code. I noticed the follow problem:

The auto_zone hold a object which is allocated by malloc.
See below:
line 325 in rpc/transport/base.h, the zone object passed to the on_message is from the m_pac.release_zone().
And this auto_zone will be passed to on_response in session_impl and then to the set_result in the future_impl.
The future_impl will hold this auto_zone until its destructor.

But the auto_ptr will use the delete not a free in reset() or destructor. I think this may be why the valgrind reports the invalid info.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions