You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jens Geyer (Jira)" <ji...@apache.org> on 2020/03/23 19:48:00 UTC
[jira] [Comment Edited] (THRIFT-5149) Limit container byte size
[ https://issues.apache.org/jira/browse/THRIFT-5149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17065045#comment-17065045 ]
Jens Geyer edited comment on THRIFT-5149 at 3/23/20, 7:47 PM:
--------------------------------------------------------------
IMHO good catch, but I'd like to ask a few questions before someone is going to dive into code:
Why is there a need to preallocate the maximum size at all?
Consequently. why should there be a need to configure the obvious?
was (Author: jensg):
Why is there a need to preallocate the maximum size at all?
Consequently. why should there be a need to configure the obvious?
> Limit container byte size
> -------------------------
>
> Key: THRIFT-5149
> URL: https://issues.apache.org/jira/browse/THRIFT-5149
> Project: Thrift
> Issue Type: Wish
> Components: C++ - Library
> Reporter: Antoine Pitrou
> Priority: Major
>
> The C++ library currently takes a container size limit which can avoid instantiating too large containers, limiting the possibility of memory bombs.
> However, some container elements may be very large and preallocating such a large container may blow up memory even if the number of elements "looks" reasonable. This allows for very small files to blow up memory (and therefore to be potential denial-of-service material).
> It would be nice to have an additional parameter to limit in-memory container byte size.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)