[
https://issues.apache.org/jira/browse/IMPALA-15010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18106779#comment-18106779
]
Joe McDonnell commented on IMPALA-15010:
----------------------------------------
Toolchain commit:
{code:java}
commit cc940e7407064f3a01a1a6baace3aa56a5025a6e
Author: Joe McDonnell <[email protected]>
Date: Wed Jun 17 17:28:41 2026 -0700
IMPALA-15010: Patch gperftools to use size_t for thread cache sizes
When we allowed a larger total thread cache size in IMPALA-13479,
it introduced the possibility of wrapping the int32_t thread
cache size. This switches the thread cache sizes to use size_t
to avoid any possibility of wrapping. Google TCMalloc had already
made this change for their thread caching implementation.
This also introduces the latest gperftools 2.18.1 and drops
gperftools 2.15.
Change-Id: I39d981b55b5bce9f30a4870b2d0b92fb568f9de4
Reviewed-on: http://gerrit.cloudera.org:8080/24497
Reviewed-by: Joe McDonnell <[email protected]>
Tested-by: Joe McDonnell <[email protected]>
{code}
> Patch gperftools to prevent integer wrap when
> tcmalloc_max_total_thread_cache_bytes > INT_MAX
> ---------------------------------------------------------------------------------------------
>
> Key: IMPALA-15010
> URL: https://issues.apache.org/jira/browse/IMPALA-15010
> Project: IMPALA
> Issue Type: Bug
> Components: Infrastructure
> Affects Versions: Impala 5.0.0
> Reporter: Joe McDonnell
> Priority: Major
>
> The size and max_size counters for a thread cache are stored as a 32-bit
> signed integers inside gperftools. With the default
> tcmalloc_max_total_thread_cache_bytes, this doesn't matter. As
> tcmalloc_max_total_thread_cache_bytes goes above INT_MAX, it becomes
> hypothetically possible for the size or max size to wrap and go negative.
> This should be hard to hit, but it would be better to patch gperftools to
> prevent it. In google tcmalloc, they use size_t for the size and max_size
> counters in the thread cache.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]