[Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications

2024-03-25 Thread vladimir.mezentsev at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31460 Vladimir Mezentsev changed: What|Removed |Added Resolution|--- |FIXED

[Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications

2024-03-25 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=31460 --- Comment #9 from Sourceware Commits --- The master branch has been updated by Vladimir Mezentsev : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=99c3fe52d237eae546d7de484d0cfbd615ac192c commit

[Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications

2024-03-23 Thread carlsonj at workingcode dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31460 --- Comment #8 from James Carlson --- (In reply to Vladimir Mezentsev from comment #7) > Created attachment 15433 [details] > proposed patch That patch works perfectly. Thank you! -- You are receiving this mail because: You are on the CC

[Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications

2024-03-23 Thread vladimir.mezentsev at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31460 --- Comment #7 from Vladimir Mezentsev --- Created attachment 15433 --> https://sourceware.org/bugzilla/attachment.cgi?id=15433=edit proposed patch -- You are receiving this mail because: You are on the CC list for the bug.

[Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications

2024-03-22 Thread carlsonj at workingcode dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31460 --- Comment #6 from James Carlson --- Neat. I'd be more than happy to try out a patch. -- You are receiving this mail because: You are on the CC list for the bug.

[Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications

2024-03-22 Thread vladimir.mezentsev at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31460 --- Comment #5 from Vladimir Mezentsev --- 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

[Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications

2024-03-21 Thread vladimir.mezentsev at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31460 --- Comment #4 from Vladimir Mezentsev --- It looks like the bug is in gprofng/libcollector/heaptrace.c. I see that init_heap_intf() is not thread safe. -- You are receiving this mail because: You are on the CC list for the bug.

[Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications

2024-03-21 Thread carlsonj at workingcode dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31460 --- Comment #3 from James Carlson --- I found a clue: the application uses libtcmalloc. It seems like this recursion problem happens when that library is either ldopen'd into the address space or LD_PRELOADed in. -- You are receiving this

[Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications

2024-03-21 Thread carlsonj at workingcode dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31460 --- Comment #2 from James Carlson --- First of all, your test case: % gcc -pthread t.c t.c:3:11: warning: built-in function 'calloc' declared as non-function [-Wbuiltin-declaration-mismatch] 3 | long long calloc = 0; |

[Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications

2024-03-20 Thread vladimir.mezentsev at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31460 --- Comment #1 from Vladimir Mezentsev --- I cannot reproduce the problem on OL8 with libpthread-2.28. It looks like calloc() is called in ./nptl/pthread_setspecific.c:69 But this calloc() must be from libc, not from the user application.

[Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications

2024-03-19 Thread vladimir.mezentsev at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=31460 Vladimir Mezentsev changed: What|Removed |Added Last reconfirmed||2024-03-19 Ever confirmed|0

[Bug gprofng/31460] heap tracing causes infinite recursion on calloc with multi-threaded applications

2024-03-07 Thread sam at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=31460 Sam James changed: What|Removed |Added CC||sam at gentoo dot org -- You are