Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@jason-simmons
Copy link
Member

FlatBuffer deserialization may segfault if the buffer is based at an unaligned address.

output.write(f'#include "{output_header_basename}"\n')
output.write(f'const unsigned char impeller_{args.symbol_name}_data[] =\n')
output.write(
f'alignas(8) const unsigned char impeller_{args.symbol_name}_data[] =\n'
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be alignas(long double).

Copy link
Member

Choose a reason for hiding this comment

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

Ooh, found this. So alignas(std::max_align_t) for maximum portability.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@chinmaygarde chinmaygarde changed the title [Impeller] Ensure that embedded blobs are placed at aligned addresses [Impeller] Ensure that embedded blobs are placed at aligned addresses. Apr 28, 2023
@jason-simmons jason-simmons force-pushed the iplr_embed_blob_align branch from fa6d796 to 8b5677a Compare April 28, 2023 20:43
FlatBuffer deserialization may segfault if the buffer is based at an
unaligned address.
@jason-simmons jason-simmons force-pushed the iplr_embed_blob_align branch from 8b5677a to 9c08adc Compare April 28, 2023 21:18
@jason-simmons jason-simmons added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 28, 2023
@auto-submit auto-submit bot merged commit 3835d97 into flutter:main Apr 28, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App e: impeller

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants