Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Two More Major Bugs Revealed in .NET 4.6's RyuJIT Compiler

Two More Major Bugs Revealed in .NET 4.6's RyuJIT Compiler

Leia em Português

Two more significant bugs have been found in .NET 4.6's RyuJIT compiler.  The first has been documented by developer Andrey Akinshin who has provided proof-of-concept code written in C# to explain the matter.  Akinshin’s work was sparked by a comment on StackOverflow from user “BrandonAGr”. 

Akinshin’s examples use nullable Booleans to show how the assembly generated by RyuJIT is incorrect when it attempts to generated optimized code.  What is distressing about the results of the example is that the first time it is executed it produces an incorrect result but not the second.  Akinshin concludes that “…[i]t seems that there is a tricky RyuJIT optimization bug which depends on big amount of additional conditions: any changes of the source code spoil reproducibility.”

Fortunately a fix for this error has been committed by Microsoft developer “schellap”.  However, as noted in this week’s earlier advisory, no binary patches have been released.  Users are expressing their frustration and concern over the state of RyuJIT in its current form.  User “EasmoneNerbonne” says that based on this reported bug, “…it looks like holding off on [RyuJIT] in general for a while looks like better advice than merely disabling tail calls”.  Akinshin agrees and user Daniel Marbach adds that “… there needs to be an update on the existing blog post and a general announcement which clearly says: DO NOT USE IN PRODUCTION.”  (Emphasis present in the original.)

The second bug has been reported by GitHub user Hyunho Richard Lee who has provided example code written in F# to demonstrate what should be a properly running program instead is producing errors (specifically FatalExecutionEngineError.)  Lee claims that installing .NET 4.6 RC will break F# programs that work correctly when targeting F# 3.1 on .NET 4.5.1 (or 4.5 or 4.5.2).

Lee’s explanation for F# developers is summarized as follows:

All current F# developers that have Seq.distinct on a Seq of KeyValuePair anywhere in their code must either control the environment that their code is deployed into so that .NET 4.6 is not installed OR they must immediately retarget all of their projects and immediately redeploy these projects.

 Microsoft developer sivarv has indicated that a fix has been committed, but as noted above, no binary release date has yet to be publicized.

Rate this Article