[all-commits] [llvm/llvm-project] 1d7786: [libunwind] Support DW_CFA_remember/restore_state ...

Dani via All-commits all-commits at lists.llvm.org
Fri Oct 30 09:45:40 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1d7786d45f48b4793baf4e4b903c4476f56ffc94
      https://github.com/llvm/llvm-project/commit/1d7786d45f48b4793baf4e4b903c4476f56ffc94
  Author: Daniel Kiss <daniel.kiss at arm.com>
  Date:   2020-10-30 (Fri, 30 Oct 2020)

  Changed paths:
    M libunwind/src/DwarfParser.hpp
    M libunwind/src/config.h

  Log Message:
  -----------
  [libunwind] Support DW_CFA_remember/restore_state without heap allocation.

This patch just reorganises the code to make possible to use alloca
instead of malloc. This makes possible to use `.cfi_remember_state`/`.cfi_restore_state` on
platforms without heap allocation.
Also it will be safe to backtrace/unwind faults related to the allocator behind malloc.
`_LIBUNWIND_REMEMBER_HEAP_ALLOC ` option reenables the heap usage for `.cfi_remember_state`/`.cfi_restore_state`.
Define _LIBUNWIND_REMEMBER_STACK_ALLOC to force stack allocation.

Reviewed By: #libunwind, mstorsjo

Differential Revision: https://reviews.llvm.org/D85005




More information about the All-commits mailing list