[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gprofng/31460] heap tracing causes infinite recursion on calloc wit
From: |
vladimir.mezentsev at oracle dot com |
Subject: |
[Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications |
Date: |
Fri, 22 Mar 2024 06:32:05 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=31460
--- Comment #5 from Vladimir Mezentsev <vladimir.mezentsev at oracle dot com>
---
The problem is:
We use pthread_getspecific() and pthread_setspecific() to access thread local
memory.
We use this memory to check that our interposed functions (like malloc, calloc
or free) don't have recursion.
For example, the first time we call calloc(), we call pthread_setspecific() to
create a thread-specific value.
On your machine, pthread_setspecific() calls calloc(), and we cannot intercept
such recursion.
gcc supports thread-local storage. For example,
static __thread int reentrance = 0;
I rewrote code using this instead of pthread_getspecific() and
pthread_setspecific().
It works on OL8, but may not work on Ubuntu.
I will try to find Ubuntu machine.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gprofng/31460] New: heap tracing causes infinite recursion on calloc with multi-threaded applications, carlsonj at workingcode dot com, 2024/03/07
- [Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications, sam at gentoo dot org, 2024/03/07
- [Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications, vladimir.mezentsev at oracle dot com, 2024/03/19
- [Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications, vladimir.mezentsev at oracle dot com, 2024/03/20
- [Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications, carlsonj at workingcode dot com, 2024/03/21
- [Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications, carlsonj at workingcode dot com, 2024/03/21
- [Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications, vladimir.mezentsev at oracle dot com, 2024/03/21
- [Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications,
vladimir.mezentsev at oracle dot com <=
- [Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications, carlsonj at workingcode dot com, 2024/03/22
- [Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications, vladimir.mezentsev at oracle dot com, 2024/03/23
- [Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications, carlsonj at workingcode dot com, 2024/03/23
- [Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications, cvs-commit at gcc dot gnu.org, 2024/03/25
- [Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications, vladimir.mezentsev at oracle dot com, 2024/03/25