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

Fix #1304, locks for condvar objects on rtems/vxworks #1311

Merged
merged 1 commit into from
Oct 17, 2022

Conversation

jphickey
Copy link
Contributor

Checklist (Please check before submitting)

Describe the contribution
Instantiate the condvar lock on rtems and vxworks even though the feature is not currently implemented. This is because OS_MAX_CONDVARS must still be nonzero and if the "Create" function is called, it still goes through the motions of allocating an ID.

This also adds a NULL check in the lock implementation, and thus if a lock is not instantiated in the future this will not dereference a NULL pointer.

Fixes #1304

Testing performed
Build and run all tests

Expected behavior changes
Missing lock is instantiated
Add null check - Avoids possible null dereference in the event of a missing lock in the future

System(s) tested on
Ubuntu 22.04

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

Instantiate the condvar lock on rtems and vxworks even though the
feature is not currently implemented.  This is because OS_MAX_CONDVARS
must still be nonzero and if the "Create" function is called, it still
goes through the motions of allocating an ID.

This also adds a NULL check in the lock implementation, and thus if a
lock is not instantiated in the future this will not dereference a NULL
pointer.
@dzbaker dzbaker added the CCB:Approved Indicates code review and approval by community CCB label Oct 13, 2022
dzbaker added a commit to nasa/cFS that referenced this pull request Oct 17, 2022
*Combines:*

cfe v7.0.0-rc4+dev197
osal v7.0.0-rc4+dev143
psp v1.6.0-rc4+dev61
elf2cfetbl v3.4.0-rc4+dev30
sch_lab v2.5.0-rc4+dev45

**Includes:**

*cFS*
- #589

*cFE*
- nasa/cFE#2165

*osal*
- nasa/osal#1311
- nasa/osal#1310
- nasa/osal#1313
- nasa/osal#1306
- nasa/osal#1309

*psp*
- nasa/PSP#365
- nasa/PSP#368

*sch_lab*
- nasa/sch_lab#126

*elf2cfetbl*
- nasa/elf2cfetbl#119

Co-authored-by: Avi Weiss <thnkslprpt@users.noreply.github.com>
Co-authored by: Joseph Hickey <jphickey@users.noreply.github.com>
Co-authored by: Ariel Adams <arielsadamsnasa@users.noreply.github.com>
@dzbaker dzbaker mentioned this pull request Oct 17, 2022
2 tasks
@dzbaker dzbaker merged commit 7bd5036 into nasa:main Oct 17, 2022
dzbaker added a commit to nasa/cFS that referenced this pull request Oct 17, 2022
*Combines:*

cfe v7.0.0-rc4+dev197
osal v7.0.0-rc4+dev143
psp v1.6.0-rc4+dev61
elf2cfetbl v3.4.0-rc4+dev30
sch_lab v2.5.0-rc4+dev45

**Includes:**

*cFS*
- #589

*cFE*
- nasa/cFE#2165

*osal*
- nasa/osal#1311
- nasa/osal#1310
- nasa/osal#1313
- nasa/osal#1306
- nasa/osal#1309

*psp*
- nasa/PSP#365
- nasa/PSP#368

*sch_lab*
- nasa/sch_lab#126

*elf2cfetbl*
- nasa/elf2cfetbl#119

Co-authored-by: Avi Weiss <thnkslprpt@users.noreply.github.com>
Co-authored by: Joseph Hickey <jphickey@users.noreply.github.com>
Co-authored by: Ariel Adams <arielsadamsnasa@users.noreply.github.com>
@jphickey jphickey deleted the fix-1304-condvar-lock branch October 18, 2022 13:55
@dmknutsen dmknutsen added this to the Draco milestone Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCB:Approved Indicates code review and approval by community CCB draco-rc4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Array access overflow in src/os/vxworks/src/os-impl-idmap.c
3 participants