Fix: lazily dlopen 2.12 lttng-ust from liblttng-ust-fd.so symbol overrides
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 4 Oct 2022 17:04:38 +0000 (13:04 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 5 Oct 2022 15:04:05 +0000 (11:04 -0400)
commit5f748425825e61bb96d55a07bafbd3f3afe4e501
treeba70c625620cd393f9533f2bcecb807eabea00f7
parentb9a2af20bf61fed1c72e1c7d9bcbe1938e3f7ecf
Fix: lazily dlopen 2.12 lttng-ust from liblttng-ust-fd.so symbol overrides

Fix warnings:

/usr/lib64/liblttng-ust-common.so.1: undefined symbol: lttng_ust_safe_close_fd

Lazily dlopen liblttng-ust.so.0 when close/fclose are used early before
execution of liblttng-ust-fd.so's constructor, and use it to perform the
perform the required dlsym() lookups to find the 2.12 LTTng-UST symbols.

Also perform these dlopen/dlsym intialization operations from
liblttng-ust-fd.so's contructor, so if close() is used from a signal
handler, it does not have to invoke dlopen()/dlsym() which are not
async-signal-safe.

Add compiler #error around closefrom() which is only emitted on Solaris
and BSDs, and not relevant to the 2.13 custom upgrade scope.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I292434328f512bbb284c97f6a6170edbeef7c222
src/lib/lttng-ust-common/fd-tracker.c
src/lib/lttng-ust-common/fd-tracker.h
src/lib/lttng-ust-fd/lttng-ust-fd.c
This page took 0.026922 seconds and 5 git commands to generate.