Skip to content

Strange behaviour in Release mode / Linux  #12035

@lssilva

Description

@lssilva

We have a large F# module that performs some simulation and we observed that change (example in the code shown below) generated some unexpected values that we cannot yet explain.

The unexpected behaviour only happens when the code was deployed and used via nugets / release mode in Linux/Docker (We tried different SDK and still persisted)

The problem cannot be reproduced in development mode / Windows

let mainFunction 
        (a : bool)
        (b : bool)
        (c : float[]) 
        (d : bool)
        (e : float[][])
        (f : int[])
        (g : float[])
        (h : int[])
        (i : int)
        (j : float[])
        (k : float)
        (l : float)
        (x : float[][])
        (y : float[][])
        (z : float[][])
        
 let helperFunction = 
            mainFunction  a b c d f g h i j k l
            
            
 // Calling function             
 helperFunction x y z 

Explicitely naming the arguments in the helper function and passing it down caused the issue

let mainFunction 
        (a : bool)
        (b : bool)
        (c : float[]) 
        (d : bool)
        (e : float[][])
        (f : int[])
        (g : float[])
        (h : int[])
        (i : int)
        (j : float[])
        (k : float)
        (l : float)
        (x : float[][])
        (y : float[][])
        (z : float[][])
        
 let helperFunction x y z = 
            mainFunction  a b c d f g h i j k l x y z
            
            
 // Calling function             
 helperFunction x y z 

Any input is appreciated

The docker image it was deployed in

FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
and
FROM mcr.microsoft.com/dotnet/aspnet:3.1-alpine AS base`` and FROM mcr.microsoft.com/dotnet/aspnet:3.1.9-alpine3.12 AS base``

The library targets netstandard2.0 and
it was compiled with
dotnet pack -c Release -o targets

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions