add stacktrace support when requested for host builds#181264
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. 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. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
There was a problem hiding this comment.
Code Review
The pull request successfully adds stacktrace support for host builds as intended. The change correctly integrates the is_host_build function into the backtrace enablement logic, ensuring that host builds benefit from this feature. The pre-launch checklist is also fully completed.
| if args.backtrace: | ||
| gn_args['enable_backtrace'] = ( | ||
| args.target_os in ['linux', 'mac', 'win'] or | ||
| is_host_build(args) or args.target_os in ['linux', 'mac', 'win'] or |
There was a problem hiding this comment.
The condition for enable_backtrace contains some redundancy. The is_host_build(args) function already covers args.target_os == 'mac' and args.target_os == 'linux' and args.linux_cpu == 'arm64'. Therefore, explicitly including 'mac' and 'linux' in the args.target_os in ['linux', 'mac', 'win'] list creates redundant checks.
To improve readability and conciseness, consider simplifying the condition by removing the redundant checks for 'mac' and 'linux' from the list, as they are already covered by is_host_build(args) or the explicit args.target_os == 'linux' check.
This aligns with the repository's philosophy to "Optimize for readability" and "Write what you need and no more, but when you write it, do it right." (Repository Style Guide, lines 29, 31).
| is_host_build(args) or args.target_os in ['linux', 'mac', 'win'] or | |
| is_host_build(args) or args.target_os == 'linux' or args.target_os == 'win' or |
There was a problem hiding this comment.
This check is not redundant as for host builds, args.target_os is None.
d870f16 to
bca34d4
Compare
flutter/flutter@1d9d6a9...9eafba4 2026-02-01 [email protected] Roll Skia from a8ceddc2bca0 to 4ee9eb659ae0 (1 revision) (flutter/flutter#181773) 2026-02-01 [email protected] Roll Skia from a5a535bc21a3 to a8ceddc2bca0 (1 revision) (flutter/flutter#181772) 2026-02-01 [email protected] Roll Dart SDK from cde322c518b9 to 84abc8d58ec8 (1 revision) (flutter/flutter#181767) 2026-02-01 [email protected] Roll Dart SDK from c72b3f527a07 to cde322c518b9 (1 revision) (flutter/flutter#181763) 2026-01-31 [email protected] Roll Dart SDK from 43de79f08887 to c72b3f527a07 (1 revision) (flutter/flutter#181762) 2026-01-31 [email protected] Roll Fuchsia Linux SDK from 27OsrsrKcrr2pOaqY... to nI52U4LJMrBv8G1M9... (flutter/flutter#181760) 2026-01-31 [email protected] Roll Dart SDK from a0aac59705e5 to 43de79f08887 (1 revision) (flutter/flutter#181758) 2026-01-31 [email protected] Roll Skia from b704afbcd8e7 to a5a535bc21a3 (1 revision) (flutter/flutter#181757) 2026-01-31 [email protected] Roll Dart SDK from d6f77f9098e1 to a0aac59705e5 (1 revision) (flutter/flutter#181756) 2026-01-31 [email protected] Roll Skia from 6f9511ce11ba to b704afbcd8e7 (4 revisions) (flutter/flutter#181753) 2026-01-31 [email protected] Roll Dart SDK from 0cf997832948 to d6f77f9098e1 (2 revisions) (flutter/flutter#181749) 2026-01-31 [email protected] Roll Skia from 33c00c0f3b8b to 6f9511ce11ba (1 revision) (flutter/flutter#181744) 2026-01-31 [email protected] Roll Dart SDK from be3ffc51d407 to 0cf997832948 (1 revision) (flutter/flutter#181740) 2026-01-30 [email protected] Roll Skia from b62d43b59dd6 to 33c00c0f3b8b (1 revision) (flutter/flutter#181735) 2026-01-30 [email protected] [Impeller] Fix type conversion warnings seen on Windows when Impeller GL API wrappers log arguments with function types (flutter/flutter#181734) 2026-01-30 [email protected] Update New Android API Docs (flutter/flutter#180604) 2026-01-30 [email protected] Roll Fuchsia Linux SDK from isy1ARvK-3bsvtfc-... to 27OsrsrKcrr2pOaqY... (flutter/flutter#181733) 2026-01-30 [email protected] Fix P3-to-sRGB color conversion to operate in linear light (flutter/flutter#181720) 2026-01-30 [email protected] chore: deflake Linux_mokey flutter_engine_group_performance (flutter/flutter#181624) 2026-01-30 [email protected] Roll Dart SDK from 2703fd9733ce to be3ffc51d407 (1 revision) (flutter/flutter#181729) 2026-01-30 [email protected] Ensure content-sizing resize is run on UI thread (flutter/flutter#181686) 2026-01-30 [email protected] [ Tool ] Cleanup `ResidentCompiler` initialization logic (flutter/flutter#181421) 2026-01-30 [email protected] [native assets] Split debug info into `.dsym` files (flutter/flutter#181533) 2026-01-30 [email protected] Roll Skia from 4745eb2fe837 to b62d43b59dd6 (1 revision) (flutter/flutter#181727) 2026-01-30 [email protected] add ccache support for custom toolchain (flutter/flutter#180737) 2026-01-30 [email protected] update GLFW to latest and use EGL context creation on linux (flutter/flutter#181259) 2026-01-30 [email protected] add stacktrace support when requested for host builds (flutter/flutter#181264) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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
Adds support for backtraces when requested in host builds ### Before: ``` Note: Google Test filter = Play/RendererTest.BabysFirstTriangle/OpenGLES [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from Play/RendererTest [ RUN ] Play/RendererTest.BabysFirstTriangle/OpenGLES ... Segmentation fault (core dumped) __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json ./out/host_debug_unopt/exe.unstripped/impeller_unittests --enable_playground --gtest_filter='Play/RendererTest.BabysFirstTriangle/OpenGLES' ``` ### After: ``` Note: Google Test filter = Play/RendererTest.BabysFirstTriangle/OpenGLES [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from Play/RendererTest [ RUN ] Play/RendererTest.BabysFirstTriangle/OpenGLES ... [symbolize_elf.inc : 379] RAW: Unable to get high fd: rc=0, limit=1024 [ERROR:flutter/fml/backtrace.cc(108)] Caught signal SIGSEGV during program execution. Frame 0: 0x55831f19fbc4 impeller::DeviceBufferGLES::GetBufferData() Frame 1: 0x55831f186cd3 impeller::BufferBindingsGLES::BindUniformBufferV2() Frame 2: 0x55831f186b66 impeller::BufferBindingsGLES::BindUniformBufferV3() Frame 3: 0x55831f1861da impeller::BufferBindingsGLES::BindUniformBuffer() Frame 4: 0x55831f185fea impeller::BufferBindingsGLES::BindUniformData() Frame 5: 0x55831f1cb112 impeller::EncodeCommandsInReactor() ... Segmentation fault (core dumped) __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json ./out/host_debug_unopt/exe.unstripped/impeller_unittests --enable_playground --gtest_filter='Play/RendererTest.BabysFirstTriangle/OpenGLES' ``` Fixes flutter#181156 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
Adds support for backtraces when requested in host builds ### Before: ``` Note: Google Test filter = Play/RendererTest.BabysFirstTriangle/OpenGLES [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from Play/RendererTest [ RUN ] Play/RendererTest.BabysFirstTriangle/OpenGLES ... Segmentation fault (core dumped) __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json ./out/host_debug_unopt/exe.unstripped/impeller_unittests --enable_playground --gtest_filter='Play/RendererTest.BabysFirstTriangle/OpenGLES' ``` ### After: ``` Note: Google Test filter = Play/RendererTest.BabysFirstTriangle/OpenGLES [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from Play/RendererTest [ RUN ] Play/RendererTest.BabysFirstTriangle/OpenGLES ... [symbolize_elf.inc : 379] RAW: Unable to get high fd: rc=0, limit=1024 [ERROR:flutter/fml/backtrace.cc(108)] Caught signal SIGSEGV during program execution. Frame 0: 0x55831f19fbc4 impeller::DeviceBufferGLES::GetBufferData() Frame 1: 0x55831f186cd3 impeller::BufferBindingsGLES::BindUniformBufferV2() Frame 2: 0x55831f186b66 impeller::BufferBindingsGLES::BindUniformBufferV3() Frame 3: 0x55831f1861da impeller::BufferBindingsGLES::BindUniformBuffer() Frame 4: 0x55831f185fea impeller::BufferBindingsGLES::BindUniformData() Frame 5: 0x55831f1cb112 impeller::EncodeCommandsInReactor() ... Segmentation fault (core dumped) __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json ./out/host_debug_unopt/exe.unstripped/impeller_unittests --enable_playground --gtest_filter='Play/RendererTest.BabysFirstTriangle/OpenGLES' ``` Fixes flutter#181156 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
Adds support for backtraces when requested in host builds ### Before: ``` Note: Google Test filter = Play/RendererTest.BabysFirstTriangle/OpenGLES [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from Play/RendererTest [ RUN ] Play/RendererTest.BabysFirstTriangle/OpenGLES ... Segmentation fault (core dumped) __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json ./out/host_debug_unopt/exe.unstripped/impeller_unittests --enable_playground --gtest_filter='Play/RendererTest.BabysFirstTriangle/OpenGLES' ``` ### After: ``` Note: Google Test filter = Play/RendererTest.BabysFirstTriangle/OpenGLES [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from Play/RendererTest [ RUN ] Play/RendererTest.BabysFirstTriangle/OpenGLES ... [symbolize_elf.inc : 379] RAW: Unable to get high fd: rc=0, limit=1024 [ERROR:flutter/fml/backtrace.cc(108)] Caught signal SIGSEGV during program execution. Frame 0: 0x55831f19fbc4 impeller::DeviceBufferGLES::GetBufferData() Frame 1: 0x55831f186cd3 impeller::BufferBindingsGLES::BindUniformBufferV2() Frame 2: 0x55831f186b66 impeller::BufferBindingsGLES::BindUniformBufferV3() Frame 3: 0x55831f1861da impeller::BufferBindingsGLES::BindUniformBuffer() Frame 4: 0x55831f185fea impeller::BufferBindingsGLES::BindUniformData() Frame 5: 0x55831f1cb112 impeller::EncodeCommandsInReactor() ... Segmentation fault (core dumped) __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json ./out/host_debug_unopt/exe.unstripped/impeller_unittests --enable_playground --gtest_filter='Play/RendererTest.BabysFirstTriangle/OpenGLES' ``` Fixes flutter#181156 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
Adds support for backtraces when requested in host builds
Before:
After:
Fixes #181156
Pre-launch Checklist
///).