Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overlapping arrays in copy #71

Open
yannick opened this issue Aug 12, 2015 · 1 comment
Open

Overlapping arrays in copy #71

yannick opened this issue Aug 12, 2015 · 1 comment

Comments

@yannick
Copy link
Contributor

yannick commented Aug 12, 2015

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?

@repeatedly
Copy link
Member

That's weird. msgpack-d checks array overlap in this line >

unparsed = area.overlap(unparsed) ? unparsed.dup : unparsed;

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants