Sdk: [CP][stable channel] Fix StackOverflow when building Flutter applications in release/profile mode

Created on 24 Aug 2020  路  7Comments  路  Source: dart-lang/sdk

commit(s) to merge: 5e551dd926969dc2642cc027fd9215c7365f707b

merge instructions: clean merge

What is the issue: When building Flutter application a user might encounter a transient StackOverflow in Dart AOT pipeline at TFA step, which comes and goes depending on the changes to the application itself and which OS used when building.

What is the fix: Underlying issue is that TFA callstacks are proportional in depth to potential application call-stacks meaning that TFA can hit an overflow even if application itself does not. TFA was changed to detect when its analysis takes too much stack space and defer subsequent computation instead of recursing further.

Why cherrypick: Currently there is no indication that large numbers of users are affected, however in theory any application can be transiently affected _without clear and actionable workaround_.

Risk: Minimal, the fix itself is on the small side. Precision of TFA analysis results is affected which might reveal some other hidden bugs, but that is a usual risk for any fix.

Link to original issue(s): https://github.com/flutter/flutter/issues/63560

/cc @dgrove @kevmoo @mit-mit @whesse @athomas @vsmenon @franklinyow @alexmarkov

area-vm cherry-pick-review cp-approved merge-to-beta merge-to-stable

Most helpful comment

Merged to beta (2.10.0-7.3.beta) and stable (2.9.2).

All 7 comments

After trying to cherry-pick and build the engine locally by ourselves, we face that can't set the target-platform for local build engine #64554, it seems that cherry-pick this fix as a hotfix may be the only one solution to help us at this time.

Please kindly to help review this cp @dgrove @kevmoo @mit-mit @whesse @athomas @vsmenon @franklinyow @alexmarkov

lgtm - any concerns or objections?

@a-siva has gave LGTM in Scrum meeting notes.

Marked approved, both 1.20 stable and 1.21 beta
@pcsosinski

On the double! plz

Merged to beta (2.10.0-7.3.beta) and stable (2.9.2).

May I ask when the dart SDK 2.9.2 will roll into flutter? @athomas

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ranquild picture ranquild  路  3Comments

Hixie picture Hixie  路  3Comments

sgrekhov picture sgrekhov  路  3Comments

jmesserly picture jmesserly  路  3Comments

DartBot picture DartBot  路  3Comments