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 #1412, Wrong memory alignment calculation #1413

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

frank-kue
Copy link
Contributor

Checklist (Please check before submitting)

Describe the contribution
A clear and concise description of what the contribution is.

Testing performed
Steps taken to test the contribution:

  • I rebuild and tested this fix with exactly the cFS/OSAL code, configuration and environment in which bug caused a crash of the test coverage-vxworks-tasks-testrunner.exe. The test executed successfully (with out crash) when build with -O2 as well as -O0. This was RTEMS 6, ARM architecture and BSP xilinx_zynq_a9_qemu and tests run on QEMU.
  • Moreover, I build and run the current cFS (with OSAL) git head with and without this patch and did run all tests. cFS: 2402f753b6e45341437bb352fad59a97485f27ce and OSAL 7e1ffbb61053e1805a0f7dd401b17f9d90e25fbd. These where the standard "ouf-of-box" cFS builds for SIMULATION=native (Linux) and for SIMULATION=i686-rtems6.

Expected behavior changes
Test coverage-vxworks-tasks-testrunner.exe should not crash.

System(s) tested on
See above.

Additional context
None.

Third party code
None.

Contributor Info - All information REQUIRED for consideration of pull request
Frank Kuehndel, embedded brains GmbH & Co. KG

@frank-kue frank-kue marked this pull request as ready for review October 4, 2023 14:22
Copy link
Contributor

@jphickey jphickey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting this, I don't know how this had been in there for years and never noticed.

@jphickey jphickey force-pushed the fix-1412-wrong-memory-alignment branch from 7e1ffbb to 51ec0e4 Compare November 13, 2023 14:24
Copy link
Contributor

@jphickey jphickey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just reverted the change from cpuaddr back to size_t -- as the NextSize local variable is a size_t here. Pedantic as they are almost certainly the same underlying type, but correct nonetheless. Just need the "-1".

@dzbaker dzbaker added the CCB:Approved Indicates code review and approval by community CCB label Nov 30, 2023
dzbaker added a commit to nasa/cFS that referenced this pull request Dec 5, 2023
*Combines:*

to_lab v2.5.0-rc4+dev71
ci_lab v2.5.0-rc4+dev77
cFE v7.0.0-rc4+dev427
PSP v1.6.0-rc4+dev102
osal v6.0.0-rc4+dev243

**Includes:**

*to_lab*
- nasa/to_lab#173

*ci_lab*
- nasa/ci_lab#157
- nasa/ci_lab#159
- nasa/ci_lab#161

*cFE*
- nasa/cFE#2411
- nasa/cFE#2409
- nasa/cFE#2373
- nasa/cFE#2466
- nasa/cFE#2468
- nasa/cFE#2470

*PSP*
- nasa/PSP#421

*osal*
- nasa/osal#1413

Co-authored by: Joseph Hickey <[email protected]>
Co-authored by: Isaac Rowe <[email protected]>
Co-authored by: Jacob Hageman <[email protected]>
Co-authored by: Frank Kühndel <[email protected]>
@dzbaker dzbaker mentioned this pull request Dec 5, 2023
2 tasks
dzbaker added a commit to nasa/cFS that referenced this pull request Dec 5, 2023
*Combines:*

to_lab v2.5.0-rc4+dev71
ci_lab v2.5.0-rc4+dev77
cFE v7.0.0-rc4+dev424
PSP v1.6.0-rc4+dev102
osal v6.0.0-rc4+dev243

**Includes:**

*to_lab*
- nasa/to_lab#173

*ci_lab*
- nasa/ci_lab#157
- nasa/ci_lab#159
- nasa/ci_lab#161

*cFE*
- nasa/cFE#2409
- nasa/cFE#2373
- nasa/cFE#2466
- nasa/cFE#2468
- nasa/cFE#2470

*PSP*
- nasa/PSP#421

*osal*
- nasa/osal#1413

Co-authored by: Joseph Hickey <[email protected]>
Co-authored by: Isaac Rowe <[email protected]>
Co-authored by: Jacob Hageman <[email protected]>
Co-authored by: Frank Kühndel <[email protected]>
@dzbaker dzbaker merged commit 120fe93 into nasa:main Dec 5, 2023
20 checks passed
dzbaker added a commit to nasa/cFS that referenced this pull request Dec 5, 2023
*Combines:*

to_lab v2.5.0-rc4+dev71
ci_lab v2.5.0-rc4+dev77
cFE v7.0.0-rc4+dev424
PSP v1.6.0-rc4+dev102
osal v6.0.0-rc4+dev243

**Includes:**

*to_lab*
- nasa/to_lab#173

*ci_lab*
- nasa/ci_lab#157
- nasa/ci_lab#159
- nasa/ci_lab#161

*cFE*
- nasa/cFE#2409
- nasa/cFE#2373
- nasa/cFE#2466
- nasa/cFE#2468
- nasa/cFE#2470

*PSP*
- nasa/PSP#421

*osal*
- nasa/osal#1413

Co-authored by: Joseph Hickey <[email protected]>
Co-authored by: Isaac Rowe <[email protected]>
Co-authored by: Jacob Hageman <[email protected]>
Co-authored by: Frank Kühndel <[email protected]>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong memory alignment calculation in libc-stdlib-stubs.c function OCS_malloc()
3 participants