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

Update workflow and fix endian conversion and alignment in cista::generic_string #229

Merged
merged 10 commits into from
Sep 11, 2024

Conversation

freshFruict
Copy link
Contributor

Workflows

  • Linux: update deprecated upload-artifact version to prevent automatic build failure

cista::generic_string

  • fix missing endian conversion during (de-)serialization
  • ensure short string alignment

el->h_.size_ * sizeof(typename generic_string<Ptr>::CharT));
}
str_convert_endian(c, el->data(), static_cast<std::size_t>(el->h_.size_));
} catch (...) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is the exception swallowed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checks are supposed to be made in check_state function, so I think it's expected convert_endian_and_ptr doesn't throw exceptions related to incorrect data.
Shouldn't it be swallowed?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea of convert_endian_and_ptr is that it doesn't do any checking at all. If you want to do the endian conversion of the data inside the string after the check, then this would be a recursive step iterating the elements in the string.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright. Then I'll rewrite this part

@felixguendling
Copy link
Owner

LGTM - ready for merge?

@freshFruict
Copy link
Contributor Author

Yes. I have nothing to add to this PR

@felixguendling felixguendling merged commit fca2698 into felixguendling:master Sep 11, 2024
10 checks passed
@felixguendling
Copy link
Owner

Thank you! 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants