Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 25 Jan 2013 17:28:55 +0100
From: John Spencer <maillist-musl@...fooze.de>
To: musl@...ts.openwall.com
CC: Olivier Goudron <olivier.goudron@...il.com>
Subject: Re: Question about missing linux/version.h while statically
 compiling Redis

On 01/25/2013 04:52 PM, Olivier Goudron wrote:
> Thanks to your explainations Nagy, i have understand what was needed.
>
> The compilation goes further but end now here :
> debug.c:37:22: error: execinfo.h: No such file or directory
>
> Does execinfo.h is specific to gnu libc ?
yes, it is specific to glibc.
it provides:

backtrace()
backtrace_symbols()
backtrace_symbols_fd()

which are not defined in any standard.
man backtrace says:

VERSIONS
        backtrace(),  backtrace_symbols(),  and backtrace_symbols_fd() 
are pro‐
        vided in glibc since version 2.1.

CONFORMING TO
        These functions are GNU extensions.


so the configure script of redis should check for availability of this 
functionality, and only make use of it when it is available.

however this functionality is of dubious value, it is not the job of a 
program to print a backtrace after it crashed.
especially since a crash means that undefined behaviour was invoked, so 
anything can happen.
getting a backtrace is the job of the debugger (gdb).

i have attached a dummy header which makes these symbols a no-op, you 
can drop it into musl's include dir or into the redis source tree.

View attachment "execinfo.h" of type "text/x-chdr" (144 bytes)

Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.