[JitStressRegs=3] Regressions/common/date/date.exe fails with AV Exception with COMPlus_JitStressRegs=3
Configuration: Debug Coreclr and Mscorlib.dll Release CoreFx assemblies Release CoreCLR tests OS: Linux
Without COMPlus_JitStressRegs=3 Pass
With COMPlus_jitStressRegs=3 Fails with AccessViolationException
Stack trace:
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Globalization.CompareInfo.CompareString(String string1, Int32 offset1, Int32 length1, String string2, Int32 offset2, Int32 length2, CompareOptions options)
at System.Globalization.DateTimeFormatInfo.InsertHash(TokenHashValue[] hashTable, String str, TokenType tokenType, Int32 tokenValue)
at System.Globalization.DateTimeFormatInfo.AddMonthNames(TokenHashValue[] temp, String monthPostfix)
at System.Globalization.DateTimeFormatInfo.CreateTokenHashTable()
at System.Globalization.DateTimeFormatInfo.Tokenize(TokenType TokenMask, TokenType& tokenType, Int32& tokenValue, __DTString& str)
at System.__DTString.GetRegularToken(TokenType& tokenType, Int32& tokenValue, DateTimeFormatInfo dtfi)
at System.DateTimeParse.Lex(DS dps, __DTString& str, DateTimeToken& dtok, DateTimeRawInfo& raw, DateTimeResult& result, DateTimeFormatInfo& dtfi, DateTimeStyles styles)
at System.DateTimeParse.TryParse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles, DateTimeResult& result)
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at DateRepro.Main()
Turns out this is a duplicate of issue dotnet/coreclr#2380. Fast tail call not properly setting up stack args results in corruption of thisptr.