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

Resolve POINTER_CAST and Pointer Serialization #251

Open
LeStarch opened this issue Nov 13, 2020 · 4 comments
Open

Resolve POINTER_CAST and Pointer Serialization #251

LeStarch opened this issue Nov 13, 2020 · 4 comments
Labels
bug High Priority High Priority issue that needs to be resolved. need-to-reproduce F´  developers need to reproduce.

Comments

@LeStarch
Copy link
Collaborator

POINTER_CAST may be used for serialization, but it is machine dependent. We should investigate.

@LeStarch LeStarch added the bug label Nov 13, 2020
@LeStarch LeStarch added High Priority High Priority issue that needs to be resolved. need-to-reproduce F´  developers need to reproduce. and removed Medium Priority labels Mar 28, 2024
@matt392code
Copy link
Contributor

pointer-serialization.txt
Code addresses:

  1. Platform Independence:
  • Uses uintptr_t for consistent pointer handling
  • Implements byte-by-byte serialization for endianness control
  • Stores pointer size information for cross-platform validation
  1. Safety Features:
  • Validates pointer size during deserialization
  • Checks alignment requirements
  • Provides a framework for runtime pointer validation
  1. F Prime Integration:
  • Follows F Prime serialization patterns
  • Implements proper error handling using SerializeStatus
  • Maintains compatibility with existing F Prime components

To implement this solution:

  1. Replace direct POINTER_CAST usage with SafePointerSerializer
  2. Add validation checks appropriate for your specific use case
  3. Define valid memory ranges for pointer validation
  4. Consider adding additional metadata for pointer type validation

@thomas-bc
Copy link
Collaborator

@LeStarch is this ticket being addressed by #3286 ?

@LeStarch
Copy link
Collaborator Author

LeStarch commented Mar 3, 2025

Sort-of. This ticket needs to document the expected use case for PointerCastType:

  1. Exactly the size of pointer on the system
  2. Set to some serializable type
  3. Not to leave the system.

@LeStarch
Copy link
Collaborator Author

LeStarch commented Mar 3, 2025

I added this as a sub-issue for the parent. It will now be handled within the context of the work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug High Priority High Priority issue that needs to be resolved. need-to-reproduce F´  developers need to reproduce.
Projects
None yet
Development

No branches or pull requests

3 participants