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 #164, consistent "chunk" test sizes #169

Merged
merged 1 commit into from
Jan 18, 2022

Conversation

jphickey
Copy link
Contributor

Describe the contribution
Do not use a random uint16 to size the structure that is allocated on the stack. Pick a reasonable size that is not likely to overrun
the stack, and use it.

This fixes a crash/stack overrun issue when running on RTEMS.

Fixes #164

Testing performed
Build and sanity check CF on PC-RTEMS

Expected behavior changes
Tests pass

System(s) tested on
RTEMS 4.11.3 via QEMU+pc686 BSP

Additional context
This only fixes the random values that caused a stack overrun/crash. Would still recommend fixing other use of random numbers in tests.

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

Do not use a random uint16 to size the structure that is allocated
on the stack.  Pick a reasonable size that is not likely to overrun
the stack, and use it.

This fixes a crash/stack overrun issue when running on RTEMS.
@jphickey jphickey added the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Jan 13, 2022
@astrogeco astrogeco merged commit 3b8e512 into nasa:main Jan 18, 2022
@astrogeco astrogeco removed the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Jan 19, 2022
@astrogeco
Copy link
Contributor

CCB:2022-01-19 APPROVED

  • Fixes crashes on RTEMS

@jphickey jphickey deleted the fix-164-chunk-test-size-notrandom branch March 11, 2022 15:48
@skliper skliper added this to the Draco milestone Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test_CF_Chunks_Init_SetGiven_chunks_max_chunks_ToGiven_max_chunks creates object too large, crashes RTEMS
3 participants