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

Memory alignment issues in Table Services #314

Closed
skliper opened this issue Sep 30, 2019 · 4 comments · Fixed by #479
Closed

Memory alignment issues in Table Services #314

skliper opened this issue Sep 30, 2019 · 4 comments · Fixed by #479
Assignees
Labels
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Sep 30, 2019

The CFE code has some problem areas for CPUs that have strict memory alignment requirements (e.g. SPARC). Casting from a type with smaller requirements to a type with larger requirements generates a compile time warning and may induce a runtime exception if the memory actually is not aligned.

The following errors exist in the TBL subsystem:

{{{
/cfe/fsw/cfe-core/src/tbl/cfe_tbl_internal.c: In function 'CFE_TBL_RemoveAccessLink':
/cfe/fsw/cfe-core/src/tbl/cfe_tbl_internal.c:480:70: warning: cast increases required alignment of target type [-Wcast-align]
Status = CFE_ES_PutPoolBuf(CFE_TBL_TaskData.Buf.PoolHdl, (uint32 *)RegRecPtr->Buffers[0].BufferPtr);
^
/cfe/fsw/cfe-core/src/tbl/cfe_tbl_internal.c:492:74: warning: cast increases required alignment of target type [-Wcast-align]
Status = CFE_ES_PutPoolBuf(CFE_TBL_TaskData.Buf.PoolHdl, (uint32 *)RegRecPtr->Buffers[1].BufferPtr);
^
}}}

NOTE: This is related to PSP ticket [cfs_psp:41]

@skliper skliper self-assigned this Sep 30, 2019
@skliper skliper added the bug label Sep 30, 2019
@skliper
Copy link
Contributor Author

skliper commented Sep 30, 2019

Imported from trac issue 283. Created by jphickey on 2019-04-25T09:54:18, last modified: 2019-08-14T14:10:17

@skliper skliper removed their assignment Sep 30, 2019
@skliper skliper added this to the 6.8.0 milestone Apr 16, 2020
@skliper skliper modified the milestones: 6.8.0, 7.0.0 May 4, 2020
@skliper
Copy link
Contributor Author

skliper commented May 4, 2020

Targeting 7.0 to allow major tlm packet updates. Errors don't show up in 32bit build for MCP750 with CCSDS Version 2 set so not critical to 6.8.

@jphickey
Copy link
Contributor

jphickey commented May 5, 2020

This is already fixed in issue #437, via commit 4607e4e

@jphickey jphickey closed this as completed May 5, 2020
@skliper
Copy link
Contributor Author

skliper commented May 5, 2020

Fixed by #479

@skliper skliper modified the milestones: 7.0.0, 6.8.0 May 5, 2020
@skliper skliper added duplicate and removed bug labels May 5, 2020
@skliper skliper added bug and removed duplicate labels May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants