Skip to content

C++ EventChannel handler corrupts memory #113728

@loic-sharma

Description

@loic-sharma

Background

flutter/engine#36538 attempted to update the engine to Visual Studio 2019, however this was reverted as it broke the framework tree.

Problem

The root cause is that the EventChannel's handler stores and mutates data on the EventChannel itself. This is problematic as the EventChannel's and the handler's lifetimes are decoupled (the EventChannel does not own its handler). If the EventChannel is destroyed, the handler reads/mutates deallocated memory.

See this discussion for additional background info: #113135 (comment)

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: desktopRunning on desktopplatform-windowsBuilding on or for Windows specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions