mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
BUILD: makefile: enable backtrace by default on musl
The reason musl builds was not producing exploitable backtraces was that the toolchain used appears to automatically omit the frame pointer at -O2 but leaves it at -O0. This patch just makes sure to always append -fno-omit-frame-pointer to the BACKTRACE cflags and enables the option with musl where it now works. This will allow us to finally get exploitable traces from docker images where core dumps are not always available.
This commit is contained in:
parent
bd1d02e2b3
commit
f499fa3dcd
3
Makefile
3
Makefile
@ -401,7 +401,7 @@ ifeq ($(TARGET),linux-musl)
|
||||
USE_POLL USE_TPROXY USE_LIBCRYPT USE_DL USE_RT USE_CRYPT_H USE_NETFILTER \
|
||||
USE_CPU_AFFINITY USE_THREAD USE_EPOLL USE_LINUX_TPROXY USE_LINUX_CAP \
|
||||
USE_ACCEPT4 USE_LINUX_SPLICE USE_PRCTL USE_THREAD_DUMP USE_NS USE_TFO \
|
||||
USE_GETADDRINFO)
|
||||
USE_GETADDRINFO USE_BACKTRACE)
|
||||
INSTALL = install -v
|
||||
endif
|
||||
|
||||
@ -592,6 +592,7 @@ endif
|
||||
|
||||
ifneq ($(USE_BACKTRACE:0=),)
|
||||
BACKTRACE_LDFLAGS = -Wl,$(if $(EXPORT_SYMBOL),$(EXPORT_SYMBOL),--export-dynamic)
|
||||
BACKTRACE_CFLAGS = -fno-omit-frame-pointer
|
||||
endif
|
||||
|
||||
ifneq ($(USE_CPU_AFFINITY:0=),)
|
||||
|
Loading…
Reference in New Issue
Block a user