-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
dotnet/coreclr
#11077Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIbug
Milestone
Description
- The following code fails on
osx.10.12-x64runtime inreleasemode but succeeds indebugmode. - It succeeds on
win81-x64inreleaseanddebugmode - I didn't check any other runtimes.
public static Foo Deserialize(Stream stream)
{
using (var r = new BinaryReader (stream))
{
return new Foo (r.ReadString (), r.ReadDecimal ());
}
}
The method ReadDecimal is called before ReadString. Surprisingly this happens only with runtime methods. If we use custom methods instead (for example extensions methods which trace the order of execution) , the code works.
Find attached the zip file which contains the netcoreapp1.1 project that reproduce the issue: I have used the following commands to publish the project:
dotnet restore -r osx.10.12-x64 ParametersEvaluationOrderTest.csproj
dotnet publish -r osx.10.12-x64 -c release ParametersEvaluationOrderTest.csproj
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIbug