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

Improve arrays implementation in C++ runtime library #508

Closed
mikir opened this issue May 30, 2023 · 0 comments
Closed

Improve arrays implementation in C++ runtime library #508

mikir opened this issue May 30, 2023 · 0 comments
Assignees
Labels
c++ C++ language generator enhancement New feature or request
Milestone

Comments

@mikir
Copy link
Contributor

mikir commented May 30, 2023

C++ generated code uses for arrays special inner classes. For example for checking of offsets (ZserioOffsetChecker_*) or for initializing of offsets (ZserioOffsetInitializer_*). These inner classes store reference to owner (Zserio object) and are copyable. Such solution is error prone and can potentionally lead to dangling pointer (see #501).

Therefore, it would be better and safer to redesign C++ arrays to accept reference to owner directly in arrays' calls (e.g. in read(), write(), etc...)

@mikir mikir added enhancement New feature or request c++ C++ language generator labels May 30, 2023
@mikir mikir added this to the 2.12 milestone May 30, 2023
@Mi-La Mi-La closed this as completed May 30, 2023
@mikir mikir assigned Mi-La and mikir Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ C++ language generator enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants