Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EnC scenario: stack corruption when editing recursive function #24622

Open
tmat opened this issue Feb 3, 2018 · 1 comment
Open

EnC scenario: stack corruption when editing recursive function #24622

tmat opened this issue Feb 3, 2018 · 1 comment
Labels
Area-Interactive Interactive-EnC Test-Scenario End-to-end test scenario to be tested manually
Milestone

Comments

@tmat
Copy link
Member

tmat commented Feb 3, 2018

Likely a CLR bug: https://github.com/dotnet/coreclr/issues/16193

Steps to Reproduce:

using System;

class Program
{
    static void Main()
    {
        FuncTest(30);
    }

    static int FuncTest(int i)
    {
        Console.WriteLine(i);

        int j = 100; // conditional BP: "i == 20"
        j++;
        // j++;
        if (i == 1)
        {
            return 10;
        }
        else
        {
            return FuncTest(i - 1);
        }
    }
}     
  1. In the above code place conditional BP as indicated.
  2. F5
  3. When the BP is hit, uncomment // j++;
  4. Step (F11) until Console.WriteLine(i) is reached and then step over (F10).
  5. Observe the output.

Expected Behavior:

30
29
28
27
26
25
24
23
22
21
20
19

Actual Behavior:

30
29
28
27
26
25
24
23
22
21
20
32765
@tmat tmat added Interactive-EnC Test-Scenario End-to-end test scenario to be tested manually labels Feb 3, 2018
@tmat
Copy link
Member Author

tmat commented Feb 3, 2018

Investigation:

The IP is remapped once from IL offset 8 to 8.

IL delta:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Interactive Interactive-EnC Test-Scenario End-to-end test scenario to be tested manually
Projects
None yet
Development

No branches or pull requests

3 participants