nasa / nasa/sample_app

Implicit (compiler-added) padding in `SAMPLE_APP_Data_t` struct

Open
#240 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
67
Forks
60
PR merge metrics
No merged PRs in 30d

Description

Checklist

  • I reviewed the Contributing Guide.
  • I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.

Describe the bug
Seems to be some implicit padding added here after ErrCounter.

Code snips
https://github.com/nasa/sample_app/blob/46279d0eeadf7cfa605888acc4db6c64193e4e88/fsw/src/sample_app.h#L48-L72

Expected behavior
Make the implicit padding explicit.

Reporter Info
Avi Weiss   @thnkslprpt

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review fsw/src/sample_app.h at lines 48-72, focusing on the SAMPLE_APP_Data_t member following ErrCounter and how the compiler inserts padding. Make the padding explicit in that struct, then verify that the resulting structure matches the expected layout and that the sample app still builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.