Bug #5450
closedosmo-gsm-tester_build-osmo-nitb failing since 2022-02-08
100%
Description
https://jenkins.osmocom.org/jenkins/job/osmo-gsm-tester_build-osmo-nitb/10994/console
In file included from /home/osmocom-build/jenkins/workspace/osmo-gsm-tester_build-osmo-nitb/inst-osmo-nitb/include/osmocom/crypt/auth.h:10, from ../../include/openbsc/gsm_data.h:16, from abis_nm.c:37: abis_nm.c: In function ‘abis_nm_perform_test’: /home/osmocom-build/jenkins/workspace/osmo-gsm-tester_build-osmo-nitb/inst-osmo-nitb/include/osmocom/core/msgb.h:337:20: error: potential null pointer dereference [-Werror=null-dereference] if (OSMO_UNLIKELY(msgb_headroom(msgb) < (int) len)) ^~~~~~~~~~~~~~~~~~~
Updated by fixeria about 2 years ago
This must be related to my recent libosmocore patches:
https://gerrit.osmocom.org/c/libosmocore/+/27046 core/utils.h: add OSMO_LIKELY / OSMO_UNLIKELY macros
https://gerrit.osmocom.org/c/libosmocore/+/27048 core/msgb.h: make use of OSMO_LIKELY / OSMO_UNLIKELY
https://gerrit.osmocom.org/c/libosmocore/+/27047 core/utils.h: make use of OSMO_LIKELY in OSMO_ASSERT
Interesting, why would OSMO_[UN]LIKELY trigger this kind of error?
Perhaps because we build with -Werror=null-dereference?
Updated by fixeria about 2 years ago
- Status changed from New to In Progress
- Assignee changed from 4368 to fixeria
Updated by fixeria about 2 years ago
- Status changed from In Progress to Feedback
I cannot reproduce this with GCC 11.1.0. Neither the 'master-openbsc' job shows any signs errors:
https://jenkins.osmocom.org/jenkins/view/master/job/master-openbsc/
Here is a patch that should theoretically fix the problem:
https://gerrit.osmocom.org/c/openbsc/+/27144 libbsc: fix potential null-dereference in abis_nm_perform_test() [NEW]
Updated by fixeria about 2 years ago
- Status changed from Feedback to Resolved
- % Done changed from 0 to 100
Here is a patch that should theoretically fix the problem: [...]
And it actually does. Closing this ticket.