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
flutter build apk --analyze-size --target-platform android-arm
fails with Exception: AOT snapshotter exited with code -2147483645
#97764
Comments
Hi @Ev1lT3rm1nal, does this issue occur with the counter app as well? If it does not, please provide your |
Yes, still failing with counter app |
Hi @Ev1lT3rm1nal, please provide the verbose log of the counter app with the command you run. Thank you |
Logs
|
Hi @Ev1lT3rm1nal, does the normal |
Hi @danagbemava-nc, it works well Logs
|
--analyze-size
flag
--analyze-size
flagflutter build apk --analyze-size --target-platform android-arm
fails with Exception: AOT snapshotter exited with code -2147483645
Labelling for further investigation. |
So is this fixed or what has happened? Any updates on this issue? |
Nothing new, still waiting. If you need to build for arm only, downgrade flutter version to 2.8.1 |
I just found something new. For command, "flutter build apk --target-platform android-arm --analyze-size"
For command, "flutter build apk --target-platform android-arm"
I wasn't able to build |
So I worked only the first build? |
What? Can you elaborate? |
Can you try re-running this command on the master channel with the |
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. |
Flutter version: Logs with the For command, "flutter build apk --target-platform android-arm --analyze-size --verbose"
For command, "flutter build apk --target-platform android-arm --verbose"
I wasn't able to build |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Closed duplicate issue #105980 and reopen this issue for further investigation. @OutdatedGuy |
This will be impossible to debug without a reproduction or more informative stack trace from the crash. |
It's very easy to reproduce. The error is also thrown for the default counter app. Just have to build it for android-arm (32-bit) with the |
Thanks. Confirmed the bug - it only manifests on Windows, which is why we missed it for so long. Fix is on the way: https://dart-review.googlesource.com/c/sdk/+/250741 |
FinalizeHash(hash) was trying to avoid UB in expression 1 << 32 by casting 1 to uintptr_t. This type however is not wide enough on 32-bit platforms. Instead just use explicit comparison hashbits < kBitsPerInt32 to avoid overflow in left shift. This bug went unnoticed for a while because it the only place where we call FinalizeHash(hash) is in the snapshot profile writer code and it only triggers when gen_snapshot is a 32-bit binary - which is only true on Windows, as Mac and Linux seem to use simarm_x64 configuration instead. This UB was explicitly affecting the code behavior because C++ compiler would either optimize out or change behavior of any code that consumed value produced by FinalizeHash(hash). Fixes flutter/flutter#97764 TEST=vm/cc/DirectChainedHashMap Change-Id: I39f2b09e7516c875b765e5a065d1c1331f89fa33 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250741 Commit-Queue: Slava Egorov <vegorov@google.com> Reviewed-by: Daco Harkes <dacoharkes@google.com>
This should be fixed once Dart rolls into Flutter. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
When I run
flutter build apk --analyze-size --target-platform android-arm
I get:flutter doctor -v
Logs
flutter build apk --analyze-size --target-platform android-arm -v
The text was updated successfully, but these errors were encountered: