Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osal Integration candidate: 2021-02-02 #774

Merged
merged 40 commits into from
Feb 12, 2021
Merged

Conversation

astrogeco
Copy link
Contributor

@astrogeco astrogeco commented Feb 4, 2021

Describe the contribution
Fix #742, make sure all pointers are checked for null
Fix #742, remove null checks from internal methods.
Fix #602, bring OSAL code coverage back up to 100%
Fix #765, add null pointer check.
Fix #771, Add workflow timeout and format check
Fix #777, Static allocation of DummyVec in OSC_INUM_TO_IVEC stub
Fix #783, Initialize locals flagged in static analysis
Fix #785, Clean commented out code
Fix #788, Resolve coercion alters value warnings
Fix #790, Return status from OS_ConsoleAPI_Init
Fix #797, Update os-impl-no-symtab.c to match APIs
Fix #793, Remove unreachable code in OS_SocketOpen_Impl for BSD socket
Fix #781, Terminate UT macro variadic lists
Fix #803, Add check of semaphore to avoid unreachable code in posix
Fix #808, length-limited string length checks
Fix #809, cast args to printf in queue-test
Fix #775, Add CodeQL analysis to workflow
Fix #805, Null terminate when using strncpy
Fix #769, Apply standard formatting

Testing performed
See https://github.com/nasa/cFS/pull/182/checks

Expected behavior changes

PR #768 - Adds test cases for OS_ObjectIdFinalizeDelete, OS_DeleteAllObjects, and others to get 100% line and function coverage on VxWorks and shared/portable layers.

PR #766 - Ensures APIs check for NULL inputs or have documentation stating that a null value is allowed.

PR #772 - Adds timeout to static analysis check and adds format check. Removes old .travis.yml and updates badges in readme.

PR #776 - Adds Code QL analysis on push to main and pull requests (to main)

PR #786 - Cleans commented-out code in tests to address static analysis warnings

PR #784 - Initializes local variables to avoid returning uninitialized values from stubs and address static-analysis findings

PR #789 - Replaces two local return codes defined as uint32 with int32 to resolve static-analysis warnings

PR #802 - Simplifies switch statements based on previous checks. Removes unreachable, dead code to resolve static-analysis warnings

PR #782 - Terminates unit test macros variadic lists with NULL to address CWE-121 CodeQL warning

PR #804 - Adds a check to send the semaphore to avoid unreachable code

PR #792 - Adds a status return to OS_ConsoleAPI_Init so debug warnings will get reported correctly on errors.

PR #778 - Declares DummyVec as static to avoid warning and returning stack allocated memory when returning VecTbl in OSC_INUM_TO_IVEC stub

PR #801 - Updates types in os-impl-no-symtab.c to match latest APIs

PR #800 - Updates types in os-impl-no-symtab.c to match latest APIs

PR #807 - Fixes missing NULL terminations and applies the standard "sizeof" pattern where appropriate. No longer truncates filename in OS_ModuleInfo.

PR #811 - Fixes %u conversion in RTEMS so to address build warning

PR #810 - Create a wrapper around memchr() that mimics the non-C99 function strnlen() defined in POSIX-2008. Use this instead of `strlen()`` whenever the string being checked either originates in or will be copied into a fixed-length array buffer. No behavior changes except if a bug causes strings to be unterminated.

PR #773 - No behavior change, applies the standard formatting using clang-format

System(s) tested on
Ubuntu 18.04

Additional context
Part of nasa/cFS#182

Third party code
None

Contributor Info - All information REQUIRED for consideration of pull request
@skliper
@jphickey
@zanzaben

@astrogeco
Copy link
Contributor Author

Fix "pulls" in readme so PR links work

skliper and others added 22 commits February 9, 2021 10:17
Create a wrapper around memchr() that mimics the non-C99 function
"strnlen()" which is in POSIX-2008.

Use this instead of strlen() whenever the string being checked
either originates in or will be copied into a fixed-length array buffer.
Using %u conversion requires unsigned int arg, not necessarily uint32
Fix #771, Add workflow timeout and format check
Fix #775, Add CodeQL analysis to workflow
Fix #783, Initialize locals flagged in static analysis
Fix #788, Resolve coercion alters value warnings
Fix #793, Remove unreachable code in OS_SocketOpen_Impl for BSD socket
Fix #781, Terminate UT macro variadic lists
Fix #803, Add check of semaphore to avoid unreachable code in posix OS_BinSemCreate_Impl
Fix #790, Return status from OS_ConsoleAPI_Init
astrogeco and others added 5 commits February 12, 2021 15:44
Fix #777, Static allocation of DummyVec in OSC_INUM_TO_IVEC stub
Fix #797, Update os-impl-no-symtab.c to match APIs
Fix #796, Update os-impl-no-sockets.c to match APIs
Fix #796, Update os-impl-no-sockets.c to match APIs
Fix #805, Null terminate when using strncpy
Fix #809, cast args to printf in queue-test
Fix #808, length-limited string length checks
@astrogeco astrogeco marked this pull request as ready for review February 12, 2021 22:08
@astrogeco astrogeco merged commit ff4f523 into main Feb 12, 2021
astrogeco added a commit to nasa/cFS that referenced this pull request Feb 16, 2021
astrogeco added a commit to nasa/cFS that referenced this pull request Feb 16, 2021
astrogeco added a commit to nasa/cFS that referenced this pull request Feb 16, 2021
@skliper skliper added this to the 6.0.0 milestone Sep 24, 2021
jphickey added a commit to jphickey/osal that referenced this pull request Aug 10, 2022
Report an error if no files are available to fulfill an
include file requirement, rather than leaving an empty file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment