Skip to content

[wasm][debugger] KeepNativeSymbols=true breaks SteppingTests.SkipWasmFunctionsAccordinglyJustMyCode #86387

Description

@lambdageek

If you build a runtime with -p:KeepNativeSymbols=true and then run the debugger testsuite, SteppingTests.SkipWasmFunctionsAccordinglyJustMyCode will fail.

Note that we don't ship KeepNativeSymbols, so this is purely something that is a papercut when working on dotnet/runtime itself.

Repro steps:

./build.sh --os browser -c Debug -bl -nr:false -p:KeepNativeSymbols=true

then

make -C src/mono/wasm run-debugger-tests CONFIG=Debug TEST_FILTER='~SteppingTests.SkipWasmFunctionsAccordinglyJustMyCode'

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on May 17, 2023
  2. lambdageek commented on May 17, 2023

    @lambdageek
    MemberAuthor

    This is probably related to given how we look for stack frames in MonoProxy.SendCallStack:

    foreach (JObject frame in orig_callframes)
    {
    string function_name = frame["functionName"]?.Value<string>();
    string url = frame["url"]?.Value<string>();
    var isWasmExpressionStack = frame["scopeChain"]?[0]?["type"]?.Value<string>()?.Equals("wasm-expression-stack") == true;
    if (!(function_name.StartsWith("wasm-function", StringComparison.Ordinal) ||
    url.StartsWith("wasm://", StringComparison.Ordinal) ||
    url.EndsWith(".wasm", StringComparison.Ordinal) ||
    JustMyCode && isWasmExpressionStack ||
    function_name.StartsWith("_mono_wasm_fire_debugger_agent_message", StringComparison.Ordinal) ||
    function_name.StartsWith("mono_wasm_fire_debugger_agent_message", StringComparison.Ordinal)))
    {
    callFrames.Add(frame);
    }
    }

    With KeepNativeSymbols it's possible that some of those wasm-function symbols will have real names instead

  3. added this to the 8.0.0 milestone on May 24, 2023
  4. ghost removed
    untriagedNew issue has not been triaged by the area owner
    on May 24, 2023
  5. modified the milestones: 8.0.0, 9.0.0 on Jul 24, 2023
  6. pavelsavara commented on Aug 10, 2023

    @pavelsavara
    Member

    Why keeping the symbols fail and not keeping them works ?

    Oh wasm/native symbols will not have wasm-function prefix on it.

  7. pavelsavara commented on Aug 11, 2023

    @pavelsavara
    Member
  8. assigned and unassigned on Aug 12, 2023
  9. thaystg commented on Aug 14, 2023

    @thaystg
    Member

    This test is expected to not work in debug runtime builds, only in release.

  10. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Aug 14, 2023
  11. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Aug 14, 2023
  12. ghost locked as resolved and limited conversation to collaborators on Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions