Uh oh!
There was an error while loading. Please reload this page.
[wasm][debugger] Detect exception/error when calling runtime_invoke - #49498
Conversation
When we call runtime_invoke on wasm the exception always returns NULL and the error returns OK.
This was a problem because we were trying to get value of this new static property in DateTime type:
private static ReadOnlySpan<byte> DaysInMonth365 => new byte[] { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
As we don't know that we were getting an exception, the value that returns to the test was wrong.
The goal of this PR is detect that we got an exception when running runtime_invoke and return the expected value to debugger.
This is a temporary solution, I think the final solution is to fix runtime_invoke to return exception correctly on WASM.
We also need to support it: https://github.com/dotnet/runtime/blob/b3411852caa6a3de8ab9fa27f7860c76ef43e384/src/mono/mono/metadata/object.c#L6298ghost
commented
Mar 11, 2021
Tagging subscribers to this area: @thaystg Issue DetailsRelated to #49206. runtime/src/mono/mono/metadata/object.c Line 6298 in b341185
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
Related to #49206.
When we call runtime_invoke on wasm the exception always returns NULL and the error returns OK.
This was a problem because we were trying to get value of this new static property in DateTime type:
private static ReadOnlySpan DaysInMonth365 => new byte[] { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
As we don't know that we were getting an exception, the value that returns to the test was wrong.
The goal of this PR is detect that we got an exception when running runtime_invoke and return the expected value to debugger.
This is a temporary solution, I think the final solution is to fix runtime_invoke to return exception correctly on WASM.
We also need to support it:
runtime/src/mono/mono/metadata/object.c
Line 6298 in b341185