undefined behaviour in msgpack::unpacker::next - malloc/delete

Bug #1469090 reported by shilkin
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
msgpack (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

* Description: Ubuntu 14.10
     Release: 14.10
* 0.5.7-3ubuntu1
* I expected that application linked with msgpack3 passed all valgrind memory checks
* undefined behaviour in msgpack::unpacker::next - malloc/delete

===================================

https://github.com/shilkin/msgpack_0.5.7-bug-1469090
Step-by-step instructions to reproduce this bug.

===================================

In 0.5.7 version msgpack::unpacker holds zone in std::aut_ptr.
In msgpack::unpacker::next on line 234 we can see this code:

result->zone().reset( release_zone() );

Look here: https://github.com/msgpack/msgpack-c/blob/cpp-0.5/src/msgpack/unpack.hpp#L234
release_zone() implemented in C-style with malloc(). Line 234 causes an undefined behaviour: malloc/delete.

This bug and many others fixed in 0.5.9.
0.5.9 and 0.5.7 have the same API, so there is no reason to have old version of msgpack in Ubuntu repo.

Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

Could you describe the specific steps to reproduce the before mentioned issue?

Changed in msgpack (Ubuntu):
status: New → Incomplete
Revision history for this message
shilkin (shilkin) wrote :

Hello! here you are: https://github.com/shilkin/msgpack_0.5.7-bug-1469090
Step-by-step instructions to reproduce this bug.

Revision history for this message
shilkin (shilkin) wrote :

Knock-knock! Please, give me any feedback?

shilkin (shilkin)
description: updated
shilkin (shilkin)
Changed in msgpack (Ubuntu):
status: Incomplete → Confirmed
status: Confirmed → Incomplete
ndk (ndk-u)
Changed in msgpack (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Vitaly Isaev (vitalyisaev2) wrote :

I've faced with the same troubles. Need to update the package.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.