You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Antoine Pitrou (Jira)" <ji...@apache.org> on 2022/02/08 17:47:00 UTC

[jira] [Created] (ARROW-15615) [C++] STL allocator doesn't check for multiplication overflow

Antoine Pitrou created ARROW-15615:
--------------------------------------

             Summary: [C++] STL allocator doesn't check for multiplication overflow
                 Key: ARROW-15615
                 URL: https://issues.apache.org/jira/browse/ARROW-15615
             Project: Apache Arrow
          Issue Type: Bug
          Components: C++
            Reporter: Antoine Pitrou


The MemoryPool-backed STL allocator defined in {{arrow/stl.h}} has the following code:
{code:c++}
    Status s = pool_->Allocate(n * sizeof(T), &data);
{code}

but {{n * sizeof(T)}} might silently overflow and lead to an incorrect allocation size.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)