X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Ftracepoint.c;fp=liblttng-ust%2Ftracepoint.c;h=ce7dbbb283947f608978d4948c2df62656f1275a;hb=a58c831a07058055a6e14d09d0e5a3f40f47eae3;hp=cf7cf63c992d16e90647aa5856d82059bf05c2db;hpb=f8021d088ed27ede5af620702468a8cf4647b7fc;p=lttng-ust.git diff --git a/liblttng-ust/tracepoint.c b/liblttng-ust/tracepoint.c index cf7cf63c..ce7dbbb2 100644 --- a/liblttng-ust/tracepoint.c +++ b/liblttng-ust/tracepoint.c @@ -175,8 +175,22 @@ static void lttng_ust_tracepoint_set_v1_used(void) if (!lttng_ust_liburcu_bp_synchronize_rcu) { lttng_ust_liburcu_bp_synchronize_rcu = URCU_FORCE_CAST(void (*)(void), dlsym(RTLD_DEFAULT, "synchronize_rcu_bp")); + /* + * Allow legacy applications compiled without + * _LGPL_SOURCE to use v1 API. Those are not + * required to be linked against liburcu-bp, + * so in those situations the liburcu-bp symbols + * are not present in the global symbol table, + * and we do not need to call urcu-bp + * synchronize. + * + * However, nothing prevents a _LGPL_SOURCE + * instrumented library loaded afterwards to + * require liburcu-bp, so we need to check again + * in that situation. + */ if (!lttng_ust_liburcu_bp_synchronize_rcu) - abort(); + return; } if (!lttng_ust_liburcu_bp_before_fork) { lttng_ust_liburcu_bp_before_fork = URCU_FORCE_CAST(void (*)(void),