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

DpCatalog Data Structure Alignment #3196

Open
timcanham opened this issue Feb 10, 2025 · 0 comments
Open

DpCatalog Data Structure Alignment #3196

timcanham opened this issue Feb 10, 2025 · 0 comments
Assignees

Comments

@timcanham
Copy link
Collaborator

timcanham commented Feb 10, 2025

F´ Version >= v3.5.1
Affected Component Svc/DpCatalog

Feature Description

The data structures used by DpCatalog are overlayed on a single allocated buffer.

  1. The free list is allocated at the beginning of the memory buffer
  2. The stack for traversing the tree is allocated at the next byte past 1)
  3. The state file data is allocated at the next byte past 2)

Depending on the alignment requirements of 2) and 3), they could be misaligned on some architectures if the next byte past 1) and 2) are used. This could cause crashes.

This issue would force the alignment of the structures based on their alignment requirements.

Rationale

Safe code!

@timcanham timcanham self-assigned this Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant