[x86/Linux] Fix COMNumber::DoubleToNumberFC arguments order (dotnet/coreclr#17412)
authorKonstantin Baladurin <k.baladurin@partner.samsung.com>
Wed, 4 Apr 2018 16:38:22 +0000 (19:38 +0300)
committerJan Vorlicek <janvorli@microsoft.com>
Wed, 4 Apr 2018 16:38:22 +0000 (18:38 +0200)
We should use FCDECL3_VII/FCIMPL3_VII instead of FCDECL3/FCIMPL3
otherwise we got incorrect order of arguments that leads to crashes.

Commit migrated from https://github.com/dotnet/coreclr/commit/fe44fe6526ea3c6e6322f3684651c14865431dcf

src/coreclr/src/classlibnative/bcltype/number.cpp
src/coreclr/src/classlibnative/bcltype/number.h

index 69ee0d6..ac068d6 100644 (file)
@@ -1983,7 +1983,7 @@ ParseSection:
 #pragma warning(pop)
 #endif
 
-FCIMPL3(void, COMNumber::DoubleToNumberFC, double value, int precision, NUMBER* number)
+FCIMPL3_VII(void, COMNumber::DoubleToNumberFC, double value, int precision, NUMBER* number)
 {
     FCALL_CONTRACT;
 
index c225b3e..bf1f328 100644 (file)
@@ -31,7 +31,7 @@ struct NUMBER {
 class COMNumber
 {
 public:
-    static FCDECL3(void, DoubleToNumberFC, double value, int precision, NUMBER* number);
+    static FCDECL3_VII(void, DoubleToNumberFC, double value, int precision, NUMBER* number);
     static FCDECL1(double, NumberToDoubleFC, NUMBER* number);
     static FCDECL2(FC_BOOL_RET, NumberBufferToDecimal, NUMBER* number, DECIMAL* value);