ASN_SEQUENCE_ADD return code was checked only in 0.5% of calls
ASN_SEQUENCE_ADD return code was checked only in 0.5% of calls, existing errors not detected by sanitize address
example found:
config_pdsch() => pdsch_Config->tci_StatesToAddModList=calloc(...) is missing
So, the call to ASN1_SEQUENCE_ADD returns -1 but we miss it
Weird:
as pdsch_Config->tci_StatesToAddModList is NULL
the call using dsch_Config->tci_StatesToAddModList->list should perform SEGV
but it doesn't (even with --sanitize-address)
Merge request reports
Activity
added BUILD-ONLY label
requested review from @schmidtr
added 4G-LTE 5G-NR NSA code cleanup labels
OAI RAN-Container-Parent build (3661): failed (https://jenkins-oai.eurecom.fr/job/RAN-Container-Parent/3661/)
changed milestone to %REVIEW_CAN_START
removed NSA label
builds ends quite quickly after asn1c generation:
Generated /oai-ran/cmake_targets/ran_build/build/openair2/F1AP/MESSAGES/Makefile.am.libasncodec Generated F1AP_asn_constant.h ninja: build stopped: subcommand failed.
added 1 commit
- b7dc5237 - ASN_SEQUENCE_ADD return code was checked only in 0.5% of calls, existing...
OAI RAN-Container-Parent build (3678): failed (https://jenkins-oai.eurecom.fr/job/RAN-Container-Parent/3678/)
changed milestone to %REVIEW_IN_PROGRESS
- Resolved by Robert Schmidt
- Resolved by Robert Schmidt
- Resolved by Robert Schmidt
- Resolved by Robert Schmidt
Review by @schmidtr
Recommendations
- I really like this, we check for the return code everywhere
- I have a problem with the new file
oai_asn1.h
: as I wrote, the originalasn1_utils.h
files are layer-specific, so maybe just make in unique names - in 99% of cases where you include
oai_asn1.h
, you do it to get theasn1cSeqAdd()
macro, so maybe includecommon/utils/asn1_conversions.h
directly? you might change that file's name tooai_asn1.h
though
added 2 commits
removed 4G-LTE label
removed 5G-NR label
OAI RAN-Container-Parent build (3686): passed (https://jenkins-oai.eurecom.fr/job/RAN-Container-Parent/3686/)
OAI RAN-Container-Parent build (3687): passed (https://jenkins-oai.eurecom.fr/job/RAN-Container-Parent/3687/)
changed milestone to %REVIEW_COMPLETED_AND_APPROVED
OAI RAN-Container-Parent build (3694): passed (https://jenkins-oai.eurecom.fr/job/RAN-Container-Parent/3694/)
changed milestone to %OK_TO_BE_MERGED
mentioned in merge request !1906 (merged)
mentioned in commit 214aa505