Skip to content

Clear up meaning of MayEscape & Distinguish a local becoming reachable via globals from being reachable by other threads #1544

Open
@michael-schwarz

Description

@michael-schwarz

We make inconsistent assumptions about what "has escaped" is supposed to mean:

  • The analysis that answers the MayEscape queries claims it is about Escape analysis for thread-local variables ([escape]).
  • Thus, one would assume adding an override to say things have not escaped when the program has never been multi-threaded would be a precision improvement.
  • However, adding such a check, leads test 45/05 to fail which requires MayEscape to answer true also in single-threaded settings.

I came across this when considering #1542, where this distinction leads to a new global variable being created when reading to g#in that has not received any values as the value of the variable is still tracked locally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions