this post was submitted on 16 Jan 2024
8 points (100.0% liked)

.NET

1380 readers
2 users here now

Getting started

Useful resources

IDEs and code editors

Tools

Rules

Related communities

Wikipedia pages

founded 1 year ago
MODERATORS
 

Hi everyone,

i have a strange behaviour of the JIT in DotNet 8.0.

I have created a small demo project (on GitHub)

The crashing code is not verry complex. It is contained in a Cpp-Library compiled to DotNet-IL (managed C++). It is just doing some basic double math with a pow().

I can work arraund this problem by slightly changing the code but that is not satisfying. I whant to understand what i am doing wrong in c++ or if there is a bug in the JIT compiler or C++ compiler.

The code is working in a debug build and even the first 1000+ calls in a release build are working fine. At the point the Jit compiles the method again in stage 2 with full optimization the code starts crashing.

The crashing code is wrapped in a Try-Catch in the CS-Console project.

When setting a break point in the release build (after the first exception) to inspect the situation everything runs perfectly. Even after removint the break point and continue the execution the code runs fine.

Would be really nice if some one can help me with this.

Thanks in advanced!

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 5 months ago

You should probably report this as an issue on the dotnet runtime GitHub repo: https://github.com/dotnet/runtime

I would also suggest you include information on the hardware you’re using for this (architecture, ram, cpu, etc).