Project

General

Profile

Actions

Bug #5450

closed

osmo-gsm-tester_build-osmo-nitb failing since 2022-02-08

Added by osmith 6 months ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
02/10/2022
Due date:
% Done:

100%

Spec Reference:

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))
                    ^~~~~~~~~~~~~~~~~~~
Actions #1

Updated by fixeria 6 months 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?

Actions #2

Updated by fixeria 6 months ago

  • Status changed from New to In Progress
  • Assignee changed from sysmocom to fixeria
Actions #3

Updated by fixeria 6 months 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]

Actions #4

Updated by fixeria 6 months 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.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)