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
Contributor

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
Contributor

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
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Apr 29, 2023
flutter/engine@1ae848c...3835d97

2023-04-28 jason-simmons@users.noreply.github.com [Impeller] Ensure that embedded blobs are placed at aligned addresses. (flutter/engine#41526)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
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