Skip to content

ICorDebugFunction5::DisableOpimizations causes target app to be terminated on Linux #97461

Closed

Description

@gregg-miskelly

Description

If a debugger uses ICorDebugFunction5::DisableOpimizations on Linux (and I am assuming macOS as well, but I didn't test) the target app will be terminated. Before terminated, the following message is printed:

Unknown debugger event type: 0x258

This message is from this code, and the event type is DB_IPCE_DISABLE_OPTS.

Reproduction Steps

  1. Create a new .NET 8 console application
  2. Configure the debugger to disable Just My Code, and load symbols for System.Console (enable downloading symbol from the Microsoft symbol server)
  3. Set a breakpoint on the call to Console.WriteLine
  4. Step in

Expected behavior

Console.WriteLine should be deoptimized and the step should complete

Actual behavior

Target process is aborted

Regression?

This is a new feature in .NET 8. So, it is a regression in that the VS debuggers will automatically use it if it is present and that causes the target to crash.

Known Workarounds

Don't use the new feature

Configuration

I am using .NET Runtime 8.0.1 on Linux-x64

Other information

No response

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Jan 24, 2024
  2. delmyers commented on Jan 24, 2024

    @delmyers

    In newer versions of VS, you can turn off automatic deoptimizations as a work-around.

  3. linked a pull request that will close this issueAdd additionalSize for the DisableOptData #97476on Jan 24, 2024
  4. ghost removed
    untriagedNew issue has not been triaged by the area owner
    on Jan 26, 2024
  5. added this to the 9.0.0 milestone on Feb 6, 2024
  6. locked and limited conversation to collaborators on Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions