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

[Impeller] Fix a buffer overrun in ImpellerC reflector resource offsets #51108

Merged

Conversation

jason-simmons
Copy link
Member

@jason-simmons jason-simmons commented Feb 29, 2024

This issue can be reproduced by running the CompilerTest.MustFailDueToMultipleLocationPerStructMember test with ASAN

(The Impeller tests are not yet running with ASAN on CI)

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@jason-simmons
Copy link
Member Author

Testing: this issue can be reproduced by running the CompilerTest.MustFailDueToMultipleLocationPerStructMember test with ASAN

(The Impeller tests are not yet running with ASAN on CI)

std::optional<size_t> Reflector::GetOffset(
spirv_cross::ID id,
const std::vector<size_t>& offsets) const {
uint32_t location =
Copy link
Member

Choose a reason for hiding this comment

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

I didn't know there was just a tool at the time impellerc was written, but there is spriv-val that we can run over the intermediate Stage 1 SPIRV to avoid getting into this situation. But being defensive here make sense to me.

@matanlurey
Copy link
Contributor

test-exempt: Will be tested by ASAN on CI, this gets us closer to being able to enable.

@jason-simmons jason-simmons added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 7, 2024
@auto-submit auto-submit bot merged commit 79d87b4 into flutter:main Mar 7, 2024
26 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 8, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 8, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Mar 8, 2024
…144813)

flutter/engine@80cd798...bbb1ed0

2024-03-08 chris@bracken.jp Move ANGLE to flutter/third_party (flutter/engine#51270)
2024-03-07 skia-flutter-autoroll@skia.org Roll Skia from 4a65dfcc70a5 to bf3f9c5f0edb (4 revisions) (flutter/engine#51268)
2024-03-07 jason-simmons@users.noreply.github.com [Impeller] Fix a buffer overrun in ImpellerC reflector resource offsets (flutter/engine#51108)

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 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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App e: impeller
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants