You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge remote-tracking branch 'origin/main' into thays_implement_debugger_proxy_attribute
* origin/main:
disable token info in traces. (dotnet#56780)
[debugger] Fix debugger.break behavior (dotnet#56788)
[mono][wasm] Allow setting env variables with '=' characters in the test runner. (dotnet#56802)
Ecma edit for `conv.ovf.<to type>.un`. (dotnet#56450)
Mark HandleProcessCorruptedStateExceptionsAttribute as obsolete (dotnet#56664)
Enable SxS install of previews on Mac OS (dotnet#56797)
CoreCLR runtime tests + Mono on the x64 iOS simulator (dotnet#43954)
[main] Update dependencies from mono/linker (dotnet#56593)
STJ: Fix deserialization of UInt16 properties (dotnet#56793)
-[Unsigned data conversion with overflow detection](#unsigned-data-conversion-with-overflow-detection)
14
15
15
16
## Signatures
16
17
@@ -907,4 +908,34 @@ For this example, the behavior of calls on objects of various types is presented
907
908
| D | B::VirtualFunction() | ERROR | A program containing type D is not valid, as B::VirtualFunction would be implemented by D::VirtualFunction which is not *covariant-return-compatible-with* (§I.8.7.1) B::VirtualFunction |
908
909
"
909
910
### II.22.27
910
-
Edit rule 12 to specify that "The method signature defined by *MethodBody* shall match those defined by *MethodDeclaration* exactly if *MethodDeclaration* defines a method on an interface or be *covariant-return-compatible-with* (§I.8.7.1) if *MethodDeclaration* represents a method on a class."
911
+
Edit rule 12 to specify that "The method signature defined by *MethodBody* shall match those defined by *MethodDeclaration* exactly if *MethodDeclaration* defines a method on an interface or be *covariant-return-compatible-with* (§I.8.7.1) if *MethodDeclaration* represents a method on a class."
912
+
913
+
## Unsigned data conversion with overflow detection
914
+
915
+
`conv.ovf.<to type>.un` opcode is purposed for converting a value on the stack to an integral value while treating the stack source as unsigned. Ecma does not distinguish signed and unsigned values on the stack so such opcode is needed as a complement for `conv.ovf.<to type>`.
916
+
So if the value on the stack is 4-byte size integral created by `Ldc_I4 0xFFFFFFFF` the results of different conversion opcodes will be:
917
+
918
+
* conv.ovf.i4 -> -1 (0xFFFFFFFF)
919
+
* conv.ovf.u4 -> overflow
920
+
* conv.ovf.i4.un -> overflow
921
+
* conv.ovf.u4.un -> uint.MaxValue (0xFFFFFFFF)
922
+
923
+
However, the source of these opcodes can be a float value and it was not clear how in such case .un should be treated. The ECMA was saying: "The item on the top of the stack is treated as an unsigned value before the conversion." but there was no definition of "treated" so the result of:
924
+
925
+
```
926
+
ldc.r4 -1
927
+
conv.ovf.i4.un
928
+
```
929
+
was ambiguous, it could treat -1 as 0xFFFFFFFF and return 0xFFFFFFFF or it could throw an overflow exception.
930
+
931
+
### III.3.19, conv.ovf.to type.un (page 354)
932
+
(Edit 1st Description paragraph:)
933
+
Convert the value on top of the stack to the type specified in the opcode, and leave that converted
934
+
value on the top of the stack. If the value cannot be represented, an exception is thrown.
935
+
936
+
(Edit 2nd Description paragraph:)
937
+
938
+
Conversions from floating-point numbers to integral values truncate the number toward zero and used as-is ignoring .un suffix. The integral item
939
+
on the top of the stack is reinterpreted as an unsigned value before the conversion.
940
+
Note that integer values of less than 4 bytes are extended to int32 (not native int) on the
Copy file name to clipboardExpand all lines: docs/project/list-of-diagnostics.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,7 @@ The PR that reveals the implementation of the `<IncludeInternalObsoleteAttribute
86
86
|__`SYSLIB0029`__| ProduceLegacyHmacValues is obsolete. Producing legacy HMAC values is no longer supported. |
87
87
|__`SYSLIB0030`__| HMACSHA1 always uses the algorithm implementation provided by the platform. Use a constructor without the useManagedSha1 parameter. |
88
88
|__`SYSLIB0031`__| EncodeOID is obsolete. Use the ASN.1 functionality provided in System.Formats.Asn1. |
89
+
|__`SYSLIB0032`__| Recovery from corrupted process state exceptions is not supported; HandleProcessCorruptedStateExceptionsAttribute is ignored. |
internalconststringCorruptedStateRecoveryMessage="Recovery from corrupted process state exceptions is not supported; HandleProcessCorruptedStateExceptionsAttribute is ignored.";
0 commit comments