haproxy/src
Willy Tarreau f734ebfac4 BUILD: threads: better workaround for late loading of libgcc_s
Commit 77b98220e ("BUG/MINOR: threads: work around a libgcc_s issue with
chrooting") tried to address an issue with libgcc_s being loaded too late.
But it turns out that the symbol used there isn't present on armhf, thus
it breaks the build.

Given that the issue manifests itself during pthread_exit(), the safest
and most portable way to test this is to call pthread_exit(). For this
we create a dummy thread which exits, during the early boot. This results
in the relevant library to be loaded if needed, making sure that a later
call to pthread_exit() will still work. It was tested to work fine under
linux on the following platforms:

 glibc:
   - armhf
   - aarch64
   - x86_64
   - sparc64
   - ppc64le

 musl:
   - mipsel

Just running the code under strace easily shows the call in the dummy
thread, for example here on armhf:

  $ strace -fe trace=file ./haproxy -v 2>&1 | grep gcc_s
  [pid 23055] open("/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3

The code was isolated so that it's easy to #ifdef it out if needed.
This should be backported where the patch above is backported (likely
2.0).
2020-09-09 19:10:46 +02:00
..
51d.c MINOR: 51d: silence a warning about null pointer dereference 2020-07-01 23:27:06 +02:00
acl.c MINOR: arg: Use chunk_destroy() to release string arguments 2020-08-07 14:27:54 +02:00
action.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
activity.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
applet.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
arg.c BUG/MEDIUM: arg: empty args list must be dropped 2020-07-21 15:53:54 +02:00
auth.c BUG/MINOR: auth: report valid crypto(3) support depending on build options 2020-09-08 14:34:04 +02:00
backend.c CLEANUP: assorted typo fixes in the code and comments 2020-07-31 11:18:07 +02:00
base64.c REORG: include: move base64.h, errors.h and hash.h from common to to haproxy/ 2020-06-11 10:18:56 +02:00
cache.c MINOR: cache: Reject duplicate cache names 2020-08-18 22:51:24 +02:00
calltrace.c REORG: include: move time.h from common/ to haproxy/ 2020-06-11 10:18:56 +02:00
cfgparse-global.c MINOR: config: make strict limits enabled by default 2020-07-07 16:52:35 +02:00
cfgparse-listen.c BUG/MEDIUM: resolve: fix init resolving for ring and peers section. 2020-07-21 17:59:20 +02:00
cfgparse-ssl.c BUG/MINOR: ssl: ssl-skip-self-issued-ca requires >= 1.0.2 2020-08-10 17:31:10 +02:00
cfgparse-tcp.c REORG: tcp: move TCP bind/server keywords from proto_tcp.c to cfgparse-tcp.c 2020-08-28 18:51:36 +02:00
cfgparse-unix.c REORG: unix: move UNIX bind/server keywords from proto_uxst.c to cfgparse-unix.c 2020-08-28 18:51:36 +02:00
cfgparse.c MEDIUM: cfgparse: Emit hard error on truncated lines 2020-08-18 22:51:24 +02:00
channel.c BUG/MEDIUM: channel: Be aware of SHUTW_NOW flag when output data are peeked 2020-07-17 10:11:34 +02:00
check.c BUG/MEDIUM: checks: Fix off-by-one in allocation of SMTP greeting cmd 2020-06-12 16:18:02 +02:00
chunk.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
cli.c MEDIUM: reload: pass all exportable FDs, not just listeners 2020-08-26 18:33:52 +02:00
compression.c BUILD: compression: make gcc 10 happy with free_zlib() 2020-06-14 08:00:19 +02:00
connection.c CLEANUP: assorted typo fixes in the code and comments 2020-07-31 11:18:07 +02:00
da.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
debug.c BUG/MINOR: debug: Don't dump the lua stack if it is not initialized 2020-07-27 09:37:18 +02:00
dgram.c REORG: dgram: rename proto_udp to dgram 2020-06-11 10:18:59 +02:00
dict.c REORG: include: move THREAD_LOCAL and __decl_thread() to compiler.h 2020-06-11 10:18:59 +02:00
dns.c BUG/MEDIUM: dns: Be sure to renew IP address for already known servers 2020-09-08 10:44:57 +02:00
dynbuf.c REORG: buffer: rename buffer.c to dynbuf.c 2020-06-29 09:26:59 +02:00
eb32sctree.c REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
eb32tree.c REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
eb64tree.c REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
ebimtree.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
ebistree.c REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
ebmbtree.c REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
ebpttree.c REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
ebsttree.c REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
ebtree.c BUG/MEDIUM: ebtree: use a byte-per-byte memcmp() to compare memory blocks 2020-06-16 11:30:33 +02:00
ev_epoll.c MINOR: debug: add a new DEBUG_FD build option 2020-06-23 10:04:54 +02:00
ev_evports.c MINOR: debug: add a new DEBUG_FD build option 2020-06-23 10:04:54 +02:00
ev_kqueue.c MINOR: debug: add a new DEBUG_FD build option 2020-06-23 10:04:54 +02:00
ev_poll.c MINOR: debug: add a new DEBUG_FD build option 2020-06-23 10:04:54 +02:00
ev_select.c MINOR: debug: add a new DEBUG_FD build option 2020-06-23 10:04:54 +02:00
extcheck.c REORG: include: move the error reporting functions to from log.h to errors.h 2020-06-11 10:18:59 +02:00
fcgi-app.c BUG/MEDIUM: fcgi-app: fix memory leak in fcgi_flt_http_headers 2020-07-15 20:23:29 +02:00
fcgi.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
fd.c MINOR: fd: add a new "exported" flag and use it for all regular listeners 2020-08-26 18:33:52 +02:00
filters.c REORG: include: move cfgparse.h to haproxy/cfgparse.h 2020-06-11 10:18:58 +02:00
flt_http_comp.c CLEANUP: assorted typo fixes in the code and comments 2020-07-06 14:34:32 +02:00
flt_spoe.c MINOR: buffer: use MT_LIST_ADDQ() for buffer_wait lists additions 2020-07-10 08:52:13 +02:00
flt_trace.c CLEANUP: assorted typo fixes in the code and comments 2020-07-31 11:18:07 +02:00
freq_ctr.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
frontend.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
h1.c BUILD: tree-wide: cast arguments to tolower/toupper to unsigned char 2020-07-05 21:50:02 +02:00
h1_htx.c MEDIUM: htx: Add a flag on a HTX message when no more data are expected 2020-07-22 16:43:32 +02:00
h2.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
haproxy.c BUG/MINOR: startup: haproxy -s cause 100% cpu 2020-09-02 16:17:14 +02:00
hash.c REORG: include: move base64.h, errors.h and hash.h from common to to haproxy/ 2020-06-11 10:18:56 +02:00
hlua.c MINOR: hlua: Add error message relative to the Channel manipulation and HTTP mode 2020-08-17 12:50:43 +02:00
hlua_fcn.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
hpack-dec.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
hpack-enc.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
hpack-huff.c REORG: include: move hpack*.h to haproxy/ and split hpack-tbl 2020-06-11 10:18:57 +02:00
hpack-tbl.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
http.c CLEANUP: assorted typo fixes in the code and comments 2020-07-06 14:34:32 +02:00
http_acl.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
http_act.c MINOR: http-rules: Add set-pathq and replace-pathq actions 2020-09-04 11:41:46 +02:00
http_ana.c MINOR: http-rules: Add set-pathq and replace-pathq actions 2020-09-04 11:41:46 +02:00
http_conv.c CLEANUP: assorted typo fixes in the code and comments 2020-07-06 14:34:32 +02:00
http_fetch.c MINOR: http-fetch: Add pathq sample fetch 2020-09-04 11:41:47 +02:00
http_htx.c MINOR: http-htx: Handle an optional reason when replacing the response status 2020-09-01 10:55:36 +02:00
http_rules.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
htx.c CLEANUP: assorted typo fixes in the code and comments 2020-07-06 14:34:32 +02:00
lb_chash.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
lb_fas.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
lb_fwlc.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
lb_fwrr.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
lb_map.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
listener.c CLEANUP: protocol: remove all ->bind_all() and ->unbind_all() functions 2020-09-02 10:40:33 +02:00
log.c CLEANUP: assorted typo fixes in the code and comments 2020-07-31 11:18:07 +02:00
lru.c MINOR: lru: new function to delete <nb> least recently used keys 2016-01-11 07:31:35 +01:00
mailers.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
map.c MINOR: arg: Use chunk_destroy() to release string arguments 2020-08-07 14:27:54 +02:00
mux_fcgi.c CLEANUP: fix all duplicated semicolons 2020-08-10 08:49:38 +02:00
mux_h1.c BUG/MEDIUM: mux-h1: always apply the timeout on half-closed connections 2020-09-08 15:49:40 +02:00
mux_h2.c CLEANUP: fix all duplicated semicolons 2020-08-10 08:49:38 +02:00
mux_pt.c MINOR: connection: Set the conncetion target during its initialisation 2020-07-15 14:08:14 +02:00
mworker-prog.c REORG: include: move the error reporting functions to from log.h to errors.h 2020-06-11 10:18:59 +02:00
mworker.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
namespace.c REORG: include: move the error reporting functions to from log.h to errors.h 2020-06-11 10:18:59 +02:00
pattern.c BUILD: tree-wide: cast arguments to tolower/toupper to unsigned char 2020-07-05 21:50:02 +02:00
payload.c MINOR: arg: Use chunk_destroy() to release string arguments 2020-08-07 14:27:54 +02:00
peers.c CLEANUP: assorted typo fixes in the code and comments 2020-07-06 14:34:32 +02:00
pipe.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
pool.c MINOR: pools: move the LRU cache heads to thread_info 2020-06-29 10:36:37 +02:00
proto_sockpair.c CLEANUP: protocol: remove all ->bind_all() and ->unbind_all() functions 2020-09-02 10:40:33 +02:00
proto_tcp.c CLEANUP: protocol: remove all ->bind_all() and ->unbind_all() functions 2020-09-02 10:40:33 +02:00
proto_udp.c CLEANUP: protocol: remove all ->bind_all() and ->unbind_all() functions 2020-09-02 10:40:33 +02:00
proto_uxst.c CLEANUP: protocol: remove all ->bind_all() and ->unbind_all() functions 2020-09-02 10:40:33 +02:00
protocol.c MAJOR: init: start all listeners via protocols and not via proxies anymore 2020-09-02 11:11:43 +02:00
proxy.c MAJOR: init: start all listeners via protocols and not via proxies anymore 2020-09-02 11:11:43 +02:00
queue.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
raw_sock.c MINOR: raw_sock: Report the number of bytes emitted using the splicing 2020-07-15 14:08:14 +02:00
regex.c OPTIM: regex: PCRE2 use JIT match when JIT optimisation occured. 2020-08-14 07:53:40 +02:00
ring.c CLEANUP: fix all duplicated semicolons 2020-08-10 08:49:38 +02:00
sample.c MINOR: arg: Use chunk_destroy() to release string arguments 2020-08-07 14:27:54 +02:00
server.c MINOR: server: Improve log message sent when server address is updated 2020-09-08 10:44:57 +02:00
session.c MINOR: connection: Set the conncetion target during its initialisation 2020-07-15 14:08:14 +02:00
sha1.c BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
shctx.c REORG: include: split global.h into haproxy/global{,-t}.h 2020-06-11 10:18:58 +02:00
signal.c REORG: include: move the error reporting functions to from log.h to errors.h 2020-06-11 10:18:59 +02:00
sink.c BUG/MEDIUM: resolve: fix init resolving for ring and peers section. 2020-07-21 17:59:20 +02:00
sock.c MINOR: sock: distinguish dgram from stream types when retrieving old sockets 2020-08-28 19:26:39 +02:00
sock_inet.c MINOR: sock_inet: move the IPv4/v6 transparent mode code to sock_inet 2020-08-28 18:51:36 +02:00
sock_unix.c BUILD: sock_unix: fix build issue with isdigit() 2020-08-29 06:44:37 +02:00
ssl_ckch.c CLEANUP: assorted typo fixes in the code and comments 2020-07-06 14:34:32 +02:00
ssl_crtlist.c MINOR: cli/ssl: handle trailing slashes in crt-list commands 2020-06-25 15:40:10 +02:00
ssl_sample.c BUG/MINOR: ssl: double free w/ smp_fetch_ssl_x_chain_der() 2020-08-11 11:18:46 +02:00
ssl_sock.c MEDIUM: fd: replace usages of fd_remove() with fd_stop_both() 2020-08-26 18:33:52 +02:00
ssl_utils.c CLEANUP: ssl: ssl_sock_crt2der semicolon and spaces 2020-08-07 15:38:40 +02:00
stats.c MINOR: stats: prevent favicon.ico requests for stats page 2020-08-19 11:29:57 +02:00
stick_table.c CLEANUP: tcp: stop exporting smp_fetch_src() 2020-08-28 18:51:36 +02:00
stream.c MEDIUM: tcp-rules: Use a dedicated expiration date for tcp ruleset 2020-07-30 09:31:09 +02:00
stream_interface.c MINOR: stream-int: Be sure to have a mux to do sends and receives 2020-07-30 09:39:20 +02:00
task.c BUILD: task: work around a bogus warning in gcc 4.7/4.8 at -O1 2020-08-21 05:54:00 +02:00
tcp_act.c REORG: tcp: move TCP actions from proto_tcp.c to tcp_act.c 2020-08-28 18:51:36 +02:00
tcp_rules.c MEDIUM: tcp-rules: Use a dedicated expiration date for tcp ruleset 2020-07-30 09:31:09 +02:00
tcp_sample.c REORG: tcp: move TCP sample fetches from proto_tcp.c to tcp_sample.c 2020-08-28 18:51:36 +02:00
tcpcheck.c BUG/MEDIUM: tcp-checks: always attach the transport before installing the mux 2020-07-31 08:49:31 +02:00
thread.c BUILD: threads: better workaround for late loading of libgcc_s 2020-09-09 19:10:46 +02:00
time.c CLEANUP: assorted typo fixes in the code and comments 2020-07-06 14:34:32 +02:00
tools.c BUILD: tools: include auxv a bit later 2020-08-20 16:41:55 +02:00
trace.c MEDIUM: log/sink: re-work and merge of build message API. 2020-07-15 17:50:12 +02:00
uri_auth.c REORG: include: move the error reporting functions to from log.h to errors.h 2020-06-11 10:18:59 +02:00
vars.c CLEANUP: Add static void vars_deinit() 2020-07-07 16:52:35 +02:00
version.c BUILD: Fix build by including haproxy/global.h 2020-06-16 23:36:04 +02:00
wdt.c REORG: include: move the error reporting functions to from log.h to errors.h 2020-06-11 10:18:59 +02:00
wurfl.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
xprt_handshake.c REORG: include: move stream_interface.h to haproxy/stream_interface{,-t}.h 2020-06-11 10:18:58 +02:00
xxhash.c BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00