[cDAC] Arm64Unwinder. An overflow in the arithmetic expression (ulong)spOffset of type ulong may occur#129967
[cDAC] Arm64Unwinder. An overflow in the arithmetic expression (ulong)spOffset of type ulong may occur#129967AristidesASm wants to merge 1 commit into
Conversation
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
|
According to the native version: runtime/src/coreclr/unwinder/arm64/unwinder.cpp Lines 1378 to 1380 in 0d3df07
|
logic is right, but here another problem: |
There's no intent to get the modulo value.
Nobody will ever expect to get the absolute value. |
This is very expected behavior and well-defined in C#. |
I see. |
problem line(s):
Casting a negative int to a unsigned ulong will result is widening conversions rather than simply taking the absolute value
ex:
but:
Base on comment:
, we expect subtraction. So to achieve the desired result without connecting additional libraries, we can use the approach in this commit
Found by Linux Verification Center (linuxtesting.org) with SVACE.