msgpack-d icon indicating copy to clipboard operation
msgpack-d copied to clipboard

Overlapping arrays in copy

Open yannick opened this issue 10 years ago • 1 comments

sometimes my app crashes when unpacking huge amounts of msgpack packets. unfortunately i can't reproduce it. i get the following trace:

object.Error@(0): Overlapping arrays in copy: 4065435 byte(s) overlap of 4843686
----------------
5   filters                             0x0000000109721731 _d_arraycopy + 149
6   filters                             0x00000001096f4fa5 @safe void msgpack.StreamingUnpacker.__mixin12.feed(const(ubyte[])) + 153

why is the buffer array copied?

yannick avatar Aug 12 '15 08:08 yannick

That's weird. msgpack-d checks array overlap in this line > https://github.com/msgpack/msgpack-d/blob/2bd90892048ca1c02da1238acf9fa179f7a646b3/src/msgpack.d#L2030

Hmm... how about removing overlap check and returns always dupped array in above line?

repeatedly avatar Sep 23 '15 22:09 repeatedly