Giter VIP home page Giter VIP logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024

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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.