osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/31911 )
Change subject: on_dso_load_select: run after on_dso_load_ctx
......................................................................
on_dso_load_select: run after on_dso_load_ctx
Add priorities to ensure on_dso_load_select runs after on_dso_load_ctx.
Otherwise OTC_GLOBAL points to NULL and causes a segfault in
osmo_fd_lookup_table_extend.
Use numbers 101 and 102, as "0 to 100 are reserved for the
implementation" and cause an error from GCC.
Fixes: OS#5946
Fixes: c46a15d8 ("select: Optimize osmo_fd_get_by_fd")
Change-Id: Ia2518e82530b93c535f8f5105513e21559b895ba
---
M src/core/context.c
M src/core/select.c
2 files changed, 22 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/11/31911/1
diff --git a/src/core/context.c b/src/core/context.c
index 6b58565..a0b3a55 100644
--- a/src/core/context.c
+++ b/src/core/context.c
@@ -39,7 +39,7 @@
}
/* initialize osmo_ctx on main tread */
-static __attribute__((constructor)) void on_dso_load_ctx(void)
+static __attribute__((constructor(101))) void on_dso_load_ctx(void)
{
OSMO_ASSERT(osmo_ctx_init("main") == 0);
}
diff --git a/src/core/select.c b/src/core/select.c
index c60cd8e..69fa763 100644
--- a/src/core/select.c
+++ b/src/core/select.c
@@ -534,8 +534,9 @@
osmo_fd_lookup_table_extend(0);
}
-/* ensure main thread always has pre-initialized osmo_fds */
-static __attribute__((constructor)) void on_dso_load_select(void)
+/* ensure main thread always has pre-initialized osmo_fds
+ * priority 102: must run after on_dso_load_ctx */
+static __attribute__((constructor(102))) void on_dso_load_select(void)
{
osmo_select_init();
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31911
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia2518e82530b93c535f8f5105513e21559b895ba
Gerrit-Change-Number: 31911
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/31774 )
Change subject: tests/llc: local libs must be first in *_LDADD
......................................................................
Patch Set 1:
(1 comment)
File tests/llc/Makefile.am:
https://gerrit.osmocom.org/c/libosmo-gprs/+/31774/comment/4eb3e716_41e41c82
PS1, Line 36: $(LIBOSMOCORE_LIBS) \
> These should actually be swapped too actually, so that dependency chain is correct: first LIBOSMOGSM […]
As I explained in a similar patch in response to your similar comment, this is not as important as having the local libraries listed first. So I am not going to swap external libs in this patch.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31774
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: If5299340ad72407d01e728febf356a07a1d99681
Gerrit-Change-Number: 31774
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 14 Mar 2023 14:03:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31908 )
Change subject: tests/Makefile.am: Move LDADD to right position
......................................................................
Patch Set 1:
(1 comment)
File tests/Makefile.am:
https://gerrit.osmocom.org/c/libosmocore/+/31908/comment/52e922bc_aa918bef
PS1, Line 8: LDADD += $(top_builddir)/tests/libsercomstub.a
Idea for another patch: here we mix up local and external libs.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31908
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ifb3686f78432ac877c596004646506c540b23c53
Gerrit-Change-Number: 31908
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 14 Mar 2023 13:44:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: osmith, pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31906 )
Change subject: tests/Makefile.am: Move system libs at the end of list
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
File tests/Makefile.am:
https://gerrit.osmocom.org/c/libosmocore/+/31906/comment/9531b6e9_61d46aa4
PS1, Line 235: LDADD
> See next patch ;)
Ack
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31906
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iad6b9e39e3587849ccfd475899cbd610bf7145cd
Gerrit-Change-Number: 31906
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 14 Mar 2023 13:40:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31908 )
Change subject: tests/Makefile.am: Move LDADD to right position
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31908
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ifb3686f78432ac877c596004646506c540b23c53
Gerrit-Change-Number: 31908
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 14 Mar 2023 13:40:06 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment