Project

General

Profile

Actions

Feature #17616

open

Support backtracing on Linux with non-GNU-libc + libunwind

Added by xtkoba (Tee KOBAYASHI) almost 4 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:102425]

Description

Currently, vm_dump.c assumes that the availability of backtrace implies the existence of execinfo.h, but it is not the case with non-GNU libc (e.g. musl or Bionic) Linux systems where libunwind is installed.

A patch is attached to enable backtracing on those systems. With this patch, we modify configure so that it (1) always checks if execinfo.h exists, and that (2) when it cannot find that file on Linux, then checks if unw_backtrace is available.

In this patch, we assume (in vm_dump.c) that on Linux the availability of unw_backtrace implies the existence of libunwind.h. If it is not the case, a further modification will be needed.

It is preferable if we can choose between backtrace in glibc or unw_backtrace in libunwind when both are available. With this patch, the former is chosen by default, and the latter is chosen when ac_cv_header_execinfo_h=no is passed to configure.


Files

No data to display

Actions

Also available in: Atom PDF

Like0