Comments (3)
libunwind doesn't call malloc or sbrk by design. But it does call mmap for
memory
allocation:
libunwind.git/include/libunwind_i.h
#define GET_MEMORY(mem, size_in_bytes) \
do { \
/* Hopefully, mmap() goes straight through to a system call stub... */ \
mem = mmap (0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, \
-1, 0);
But the dynamic linker may call some mmap hook before issuing the actual system
call.
Further such hooks may make recursive calls to GetStackTrace().
in_get_stack_trace is a mechanism intended to resolve this situation. But as you
found out, it has problems in the presence of async signals.
The spin lock is guarding concurrent accesses to in_get_stack_trace.
We should probably use cmpxchg based code there.
Original comment by [email protected]
on 8 Jan 2008 at 7:48
from gperftools.
We've just finished writing a bugfix, that should be present in the next
release.
Original comment by [email protected]
on 24 Jan 2008 at 5:37
- Changed state: Started
from gperftools.
This should be fixed in perftools 0.95 (just released).
Original comment by [email protected]
on 13 Feb 2008 at 12:57
- Changed state: Fixed
from gperftools.
Related Issues (20)
- VIRT memory continues to grow when using 64k byte buffers HOT 4
- Linking libtorsocks with libtcmalloc results in SIGSEGV HOT 5
- What will be the official home for gperftools? HOT 2
- On Windows 8.1, system-alloc_unittest fails an assert HOT 1
- recalloc is wrong in windows/override_functions.cc HOT 1
- src/malloc_hook_mmap_linux.h fails to compile with clang in C++11 mode when targeting 32 bit with _FILE_OFFSET_BITS=64 HOT 1
- Should heap profiling with mingw work? HOT 4
- src/gperftools/tcmalloc.h and src/windows/gperftools/tcmalloc.h report v2.3 HOT 2
- msvc14 (visual studio 15) timespec type redefinition HOT 1
- [PATCH] Improve CPUPROFILE_PER_THREAD_TIMERS HOT 13
- Tcmalloc crashes when process adds an mmap block close to the top of the heap HOT 8
- failed to compile gperftools with "-march=armv8-a+crc" HOT 3
- Failed to build with lib musl HOT 1
- MongoDB version 3.0 build from source fails due to gperftools 2.2 on PPC64 HOT 2
- MallocExtension::GetStats() is not implemented HOT 1
- futex handling is weird (and wrong on arm) HOT 2
- Warning about non-virtual destructor in class with virtual methods HOT 1
- allow avoiding the hardcoded /tmp/google.alloc path for tracing output HOT 1
- It doesn't work on s390x architecture
- Why tcmalloc fail when I compile run program with shared library?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gperftools.