Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upcheck the size of seqs before trying to decode them #42
Conversation
|
It looks like at the least |
|
It isn't clear to me that this is really the right solution: it presumes that size_of is the same size as the representation of T when bincoded (which isn't generally correct). It is probably sufficient to assume that for this check, but I'm a bit concerned about potential corner cases where the size_of is significantly larger than bincoded T. Perhaps the real solution here is to account separately for bytes read vs bytes allocated? Maybe this is good enough for now? |
|
Oh wow. This is a pretty big issue; the kind that I had hoped to fix with I think this could be solved in a few other ways, but probably not as easily as this. Because in-memory size is just as important as wire-size, I think I should rewrite the docs saying that it can fail with SizeLimit on either. |
check the size of seqs before trying to decode them
|
Fixing |
jmesmon commentedMay 28, 2015
Fixes #41
Not sure if this style OOM issue affects other parts of the decoder.