Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Add an allocator specific check to ensure that strings passed to the timeline are not heap allocated.#8168

Merged
chinmaygarde merged 2 commits intoflutter:masterfrom
chinmaygarde:allocator_check
Mar 14, 2019
Merged

Add an allocator specific check to ensure that strings passed to the timeline are not heap allocated.#8168
chinmaygarde merged 2 commits intoflutter:masterfrom
chinmaygarde:allocator_check

Conversation

@chinmaygarde
Copy link
Contributor

@chinmaygarde chinmaygarde commented Mar 14, 2019

Verified that the tests fail on issues like #8166. Unfortunately, there is no x-platform way to perform this check but this should gate incorrect traces being added to the engine.

…imeline are not heap allocated.

Verfied that the tests fail on issues like flutter#8166. Unfortunately, there is no x-platform way to perform this check but this should gate incorrect traces being added to the engine.
#define DCHECK_LITERAL(x) \
({ \
do { \
FML_DCHECK(malloc_size((x)) == 0) \
Copy link
Member

Choose a reason for hiding this comment

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

This check will not catch everything (e.g. calling c_str() for a std::string on the stack with an internal buffer will yield a malloc_size of zero). But I guess it's better than nothing.

How expensive are the calls to malloc_size?

@chinmaygarde chinmaygarde merged commit 246f0e3 into flutter:master Mar 14, 2019
@chinmaygarde chinmaygarde deleted the allocator_check branch March 14, 2019 21:15
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 14, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 14, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 15, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 15, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 15, 2019
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Mar 15, 2019
flutter/engine@403337e...b36068c

git log 403337e..b36068c --no-merges --oneline
b36068c Roll src/third_party/skia 05201fc7e77e..aefecad7c0d2 (5 commits) (flutter/engine#8176)
b32d0ab Bugfix: Prevent crash when responding to a platform message after FlutterJNI detaches from native (#28651). (flutter/engine#8170)
d9b2f09 Roll src/third_party/skia 512e38091c85..05201fc7e77e (10 commits) (flutter/engine#8173)
4b01d79 Add frame and target time metadata to vsync events and connect platform vsync events using flows. (flutter/engine#8172)
f7a0922 [fuchsia] Remove deprecated libraries from snapshot (flutter/engine#8085)
09db84f Android Embedding PR 19: Add accessibility to new FlutterView. (flutter/engine#8109)
246f0e3 Add an allocator specific check to ensure that strings passed to the timeline are not heap allocated. (flutter/engine#8168)
7a6bb99 Roll src/third_party/skia feb720f746dc..512e38091c85 (11 commits) (flutter/engine#8169)
5825bda Roll src/third_party/dart 7d560f8385..7418238239 (61 commits)
66fdeb1 Add dump-shader-skp switch to help ShaderWarmUp (flutter/engine#8148)

The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff ([email protected]), and stop
the roller if necessary.
RBogie pushed a commit to RBogie/flutter-engine that referenced this pull request Apr 8, 2019
…timeline are not heap allocated. (flutter#8168)

Verified that the tests fail on issues like flutter#8166. Unfortunately, there is no x-platform way to perform this check but this should gate incorrect traces being added to the engine.
RBogie added a commit to RBogie/flutter-engine that referenced this pull request Apr 8, 2019
… to the timeline are not heap allocated. (flutter#8168)"

This reverts commit 1fe35cc.
RBogie added a commit to RBogie/flutter-engine that referenced this pull request Apr 8, 2019
… to the timeline are not heap allocated. (flutter#8168)"

This reverts commit 1fe35cc.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants