Ryujit tail recursive optimization bug for. NET 4.6

Source: Internet
Author: User

Today, I saw a press release in the garden. NET 4.6 Ryujit compiler found a serious bug mentioned in the. NET 4.6 x64 program to enable the new JIT program by default Ryujit when processing the tail recursion instruction, there is a bug, resulting in not getting the correct results.

Microsoft has introduced this bug in more detail in its official Blogryujit bug advisory in the. NET Framework 4.6. Although the tail recursion is not used much (seemingly there are many applications in F #), the bug is more serious:

    1. This problem only occurs when code optimization is applied, since most developers and projects are developed in DEBUG mode and therefore not visible in the local environment.
    2. Even if this problem is discovered, once the debugger is attached to the process, it will change its behavior, which almost makes the problem completely invisible.

There are three different options for this bug:

    1. Continue to use. NET 4.5 without using. NET 4.6
    2. Disable Ryujit .
    3. Disable tail recursion optimization

In these three ways, although Method 2 and Method 3 can solve this bug with. NET 4.6, it is important to note that because this is a bug in. NET 4.6, and JIT is a local behavior, it needs to be applied on all machines that execute your program. Add this bug is very vague, not immediately error, error does not necessarily know is the fault here. These two types of modifications are really difficult to implement.

In addition, in another blog mentioned several. Net 4.6 of several bug:http://nickcraver.com/blog/2015/07/27/why-you-should-wait-on-dotnet-46/, it seems, The use of. Net 4.6 In a production environment has to be weighed.

Ryujit tail recursive optimization bug for. NET 4.6

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.