Blame SOURCES/build-coreclr-clang10.patch

3d1364
commit e73f34074a381891ee92711e496134dce758a969
3d1364
Author: Omair Majid <omajid@redhat.com>
3d1364
Date:   Tue Jun 2 12:16:31 2020 -0400
3d1364
3d1364
    Fix build with clang 10
3d1364
    
3d1364
    This contains a grab bag of fixes to fix the build with clang 10.
3d1364
    
3d1364
    - https://github.com/dotnet/coreclr/pull/23075
3d1364
    
3d1364
      Fix missing includes in coreclr/src/debug/createdump/
3d1364
    
3d1364
    - https://github.com/dotnet/runtime/pull/33096
3d1364
    
3d1364
      SList::Init: add missing constructor
3d1364
    
3d1364
    - A subset of https://github.com/dotnet/coreclr/pull/22129
3d1364
    
3d1364
      Just the parts that introduce the THROW_DECL macro in pal.h
3d1364
    
3d1364
    - https://github.com/dotnet/runtime/pull/32837
3d1364
    
3d1364
      This fixes THROW_DECL introduce in the previous PR to work with clang, which
3d1364
      is required in clang 10.
3d1364
    
3d1364
    - One new change:
3d1364
    
3d1364
      In a significant divergance, this commits adds more THROW_DECL macros
3d1364
      to all the math functions to address a ton of errors pointed out when
3d1364
      building SOS:
3d1364
    
3d1364
        In file included from /home/omajid/devel/dotnet/coreclr/src/ToolBox/SOS/Strike/strike.cpp:116:
3d1364
        In file included from /home/omajid/devel/dotnet/coreclr/src/vm/hillclimbing.h:19:
3d1364
        In file included from /home/omajid/devel/dotnet/coreclr/src/inc/complex.h:16:
3d1364
        In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/math.h:36:
3d1364
        In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/cmath:45:
3d1364
        In file included from /usr/include/math.h:290:
3d1364
        /usr/include/bits/mathcalls.h:53:13: error: exception specification in declaration does not match previous declaration
3d1364
        __MATHCALL (acos,, (_Mdouble_ __x));
3d1364
                    ^
3d1364
        /home/omajid/devel/dotnet/coreclr/src/pal/inc/pal.h:4395:26: note: previous declaration is here
3d1364
        PALIMPORT double __cdecl acos(double);
3d1364
                                 ^
3d1364
    
3d1364
      Then, to make sure the declarations and implementations match, it adds
3d1364
      THROW_DECL to the definitions in src/pal/src/cruntime/math.cpp
3d1364
    
3d1364
    Co-authored-by: Mike McLaughlin <mikem@microsoft.com>
3d1364
    Co-authored-by: Sinan Kaya <sinan.kaya@microsoft.com>
3d1364
    Co-authored-by: Tom Deseyn <tom.deseyn@gmail.com>
3d1364
3d1364
diff --git a/src/debug/createdump/createdump.h b/src/debug/createdump/createdump.h
3d1364
index 4892e5464b..3f71b627e6 100644
3d1364
--- a/src/debug/createdump/createdump.h
3d1364
+++ b/src/debug/createdump/createdump.h
3d1364
@@ -54,6 +54,8 @@ typedef int T_CONTEXT;
3d1364
 #include <map>
3d1364
 #include <set>
3d1364
 #include <vector>
3d1364
+#include <string>
3d1364
+#include <array>
3d1364
 #include "datatarget.h"
3d1364
 #include "threadinfo.h"
3d1364
 #include "memoryregion.h"
3d1364
diff --git a/src/inc/slist.h b/src/inc/slist.h
3d1364
index 2b81f9ba90..8ea6f9098e 100644
3d1364
--- a/src/inc/slist.h
3d1364
+++ b/src/inc/slist.h
3d1364
@@ -160,13 +160,13 @@ public:
3d1364
     void Init()
3d1364
     {
3d1364
         LIMITED_METHOD_CONTRACT;
3d1364
-        m_pHead = &m_link;
3d1364
+        m_pHead = PTR_SLink(&m_link);
3d1364
         // NOTE :: fHead variable is template argument 
3d1364
         // the following code is a compiled in, only if the fHead flag
3d1364
         // is set to false,
3d1364
         if (!fHead)
3d1364
         {
3d1364
-            m_pTail = &m_link;
3d1364
+            m_pTail = PTR_SLink(&m_link);
3d1364
         }
3d1364
     }
3d1364
 
3d1364
@@ -274,7 +274,7 @@ public:
3d1364
         SLink   *ret = SLink::FindAndRemove(m_pHead, GetLink(pObj), &prior);
3d1364
         
3d1364
         if (ret == m_pTail)
3d1364
-            m_pTail = prior;
3d1364
+            m_pTail = PTR_SLink(prior);
3d1364
         
3d1364
         return GetObject(ret);
3d1364
     }
3d1364
diff --git a/src/pal/inc/mbusafecrt.h b/src/pal/inc/mbusafecrt.h
3d1364
index f030b7ded2..7021439af2 100644
3d1364
--- a/src/pal/inc/mbusafecrt.h
3d1364
+++ b/src/pal/inc/mbusafecrt.h
3d1364
@@ -31,6 +31,12 @@ typedef int errno_t;
3d1364
 // define the return value for success 
3d1364
 #define SAFECRT_SUCCESS 0
3d1364
 
3d1364
+#if defined(_MSC_VER)
3d1364
+#define THROW_DECL
3d1364
+#else
3d1364
+#define THROW_DECL throw()
3d1364
+#endif
3d1364
+
3d1364
 #ifdef __cplusplus
3d1364
     extern "C" {
3d1364
 #endif
3d1364
@@ -98,7 +104,7 @@ extern int swscanf_s( const WCHAR *string, const WCHAR *format, ... );
3d1364
 extern int _snscanf_s( const char *string, size_t count, const char *format, ... );
3d1364
 extern int _snwscanf_s( const WCHAR *string, size_t count, const WCHAR *format, ... );
3d1364
 
3d1364
-extern errno_t memcpy_s( void * dst, size_t sizeInBytes, const void * src, size_t count );
3d1364
+extern errno_t memcpy_s( void * dst, size_t sizeInBytes, const void * src, size_t count ) THROW_DECL;
3d1364
 extern errno_t memmove_s( void * dst, size_t sizeInBytes, const void * src, size_t count );
3d1364
 
3d1364
 #ifdef __cplusplus
3d1364
diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h
3d1364
index 5106c01421..de20524faf 100644
3d1364
--- a/src/pal/inc/pal.h
3d1364
+++ b/src/pal/inc/pal.h
3d1364
@@ -137,6 +137,11 @@ extern "C" {
3d1364
 #define LANG_THAI                        0x1e
3d1364
 
3d1364
 /******************* Compiler-specific glue *******************************/
3d1364
+#if defined(_MSC_VER) || !defined(__cplusplus)
3d1364
+#define THROW_DECL
3d1364
+#else
3d1364
+#define THROW_DECL throw()
3d1364
+#endif
3d1364
 
3d1364
 #ifndef _MSC_VER
3d1364
 #if defined(CORECLR)
3d1364
@@ -4207,7 +4212,7 @@ EXTERN_C
3d1364
 PALIMPORT
3d1364
 void *PAL_memcpy (void *dest, const void *src, size_t count);
3d1364
 
3d1364
-PALIMPORT void * __cdecl memcpy(void *, const void *, size_t);
3d1364
+PALIMPORT void * __cdecl memcpy(void *, const void *, size_t) THROW_DECL;
3d1364
 
3d1364
 #define memcpy PAL_memcpy
3d1364
 #define IS_PAL_memcpy 1
3d1364
@@ -4220,7 +4225,7 @@ PALIMPORT int    __cdecl memcmp(const void *, const void *, size_t);
3d1364
 PALIMPORT void * __cdecl memset(void *, int, size_t);
3d1364
 PALIMPORT void * __cdecl memmove(void *, const void *, size_t);
3d1364
 PALIMPORT void * __cdecl memchr(const void *, int, size_t);
3d1364
-PALIMPORT long long int __cdecl atoll(const char *);
3d1364
+PALIMPORT long long int __cdecl atoll(const char *) THROW_DECL;
3d1364
 PALIMPORT size_t __cdecl strlen(const char *);
3d1364
 PALIMPORT int __cdecl strcmp(const char*, const char *);
3d1364
 PALIMPORT int __cdecl strncmp(const char*, const char *, size_t);
3d1364
@@ -4259,7 +4264,7 @@ PALIMPORT int __cdecl toupper(int);
3d1364
 #define _TRUNCATE ((size_t)-1)
3d1364
 #endif
3d1364
 
3d1364
-PALIMPORT errno_t __cdecl memcpy_s(void *, size_t, const void *, size_t);
3d1364
+PALIMPORT errno_t __cdecl memcpy_s(void *, size_t, const void *, size_t) THROW_DECL;
3d1364
 PALIMPORT errno_t __cdecl memmove_s(void *, size_t, const void *, size_t);
3d1364
 PALIMPORT char * __cdecl _strlwr(char *);
3d1364
 PALIMPORT int __cdecl _stricmp(const char *, const char *);
3d1364
@@ -4387,58 +4392,58 @@ PALIMPORT long long __cdecl llabs(long long);
3d1364
 PALIMPORT int __cdecl _finite(double);
3d1364
 PALIMPORT int __cdecl _isnan(double);
3d1364
 PALIMPORT double __cdecl _copysign(double, double);
3d1364
-PALIMPORT double __cdecl acos(double);
3d1364
-PALIMPORT double __cdecl acosh(double);
3d1364
-PALIMPORT double __cdecl asin(double);
3d1364
-PALIMPORT double __cdecl asinh(double);
3d1364
-PALIMPORT double __cdecl atan(double);
3d1364
-PALIMPORT double __cdecl atanh(double);
3d1364
-PALIMPORT double __cdecl atan2(double, double);
3d1364
-PALIMPORT double __cdecl cbrt(double);
3d1364
-PALIMPORT double __cdecl ceil(double);
3d1364
-PALIMPORT double __cdecl cos(double);
3d1364
-PALIMPORT double __cdecl cosh(double);
3d1364
-PALIMPORT double __cdecl exp(double);
3d1364
-PALIMPORT double __cdecl fabs(double);
3d1364
-PALIMPORT double __cdecl floor(double);
3d1364
-PALIMPORT double __cdecl fmod(double, double); 
3d1364
-PALIMPORT double __cdecl log(double);
3d1364
-PALIMPORT double __cdecl log10(double);
3d1364
-PALIMPORT double __cdecl modf(double, double*);
3d1364
-PALIMPORT double __cdecl pow(double, double);
3d1364
-PALIMPORT double __cdecl sin(double);
3d1364
-PALIMPORT double __cdecl sinh(double);
3d1364
-PALIMPORT double __cdecl sqrt(double);
3d1364
-PALIMPORT double __cdecl tan(double);
3d1364
-PALIMPORT double __cdecl tanh(double);
3d1364
+PALIMPORT double __cdecl acos(double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl acosh(double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl asin(double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl asinh(double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl atan(double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl atanh(double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl atan2(double, double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl cbrt(double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl ceil(double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl cos(double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl cosh(double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl exp(double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl fabs(double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl floor(double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl fmod(double, double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl log(double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl log10(double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl modf(double, double*) THROW_DECL;
3d1364
+PALIMPORT double __cdecl pow(double, double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl sin(double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl sinh(double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl sqrt(double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl tan(double) THROW_DECL;
3d1364
+PALIMPORT double __cdecl tanh(double) THROW_DECL;
3d1364
 
3d1364
 PALIMPORT int __cdecl _finitef(float);
3d1364
 PALIMPORT int __cdecl _isnanf(float);
3d1364
 PALIMPORT float __cdecl _copysignf(float, float);
3d1364
-PALIMPORT float __cdecl acosf(float);
3d1364
-PALIMPORT float __cdecl acoshf(float);
3d1364
-PALIMPORT float __cdecl asinf(float);
3d1364
-PALIMPORT float __cdecl asinhf(float);
3d1364
-PALIMPORT float __cdecl atanf(float);
3d1364
-PALIMPORT float __cdecl atanhf(float);
3d1364
-PALIMPORT float __cdecl atan2f(float, float);
3d1364
-PALIMPORT float __cdecl cbrtf(float);
3d1364
-PALIMPORT float __cdecl ceilf(float);
3d1364
-PALIMPORT float __cdecl cosf(float);
3d1364
-PALIMPORT float __cdecl coshf(float);
3d1364
-PALIMPORT float __cdecl expf(float);
3d1364
-PALIMPORT float __cdecl fabsf(float);
3d1364
-PALIMPORT float __cdecl floorf(float);
3d1364
-PALIMPORT float __cdecl fmodf(float, float); 
3d1364
-PALIMPORT float __cdecl logf(float);
3d1364
-PALIMPORT float __cdecl log10f(float);
3d1364
-PALIMPORT float __cdecl modff(float, float*);
3d1364
-PALIMPORT float __cdecl powf(float, float);
3d1364
-PALIMPORT float __cdecl sinf(float);
3d1364
-PALIMPORT float __cdecl sinhf(float);
3d1364
-PALIMPORT float __cdecl sqrtf(float);
3d1364
-PALIMPORT float __cdecl tanf(float);
3d1364
-PALIMPORT float __cdecl tanhf(float);
3d1364
+PALIMPORT float __cdecl acosf(float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl acoshf(float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl asinf(float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl asinhf(float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl atanf(float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl atanhf(float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl atan2f(float, float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl cbrtf(float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl ceilf(float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl cosf(float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl coshf(float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl expf(float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl fabsf(float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl floorf(float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl fmodf(float, float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl logf(float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl log10f(float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl modff(float, float*) THROW_DECL;
3d1364
+PALIMPORT float __cdecl powf(float, float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl sinf(float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl sinhf(float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl sqrtf(float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl tanf(float) THROW_DECL;
3d1364
+PALIMPORT float __cdecl tanhf(float) THROW_DECL;
3d1364
 
3d1364
 #ifndef PAL_STDCPP_COMPAT
3d1364
 
3d1364
diff --git a/src/pal/src/cruntime/math.cpp b/src/pal/src/cruntime/math.cpp
3d1364
index a36ac9aa93..81345ea14b 100644
3d1364
--- a/src/pal/src/cruntime/math.cpp
3d1364
+++ b/src/pal/src/cruntime/math.cpp
3d1364
@@ -117,7 +117,7 @@ Function:
3d1364
 
3d1364
 See MSDN.
3d1364
 --*/
3d1364
-PALIMPORT double __cdecl PAL_acos(double x)
3d1364
+PALIMPORT double __cdecl PAL_acos(double x) THROW_DECL
3d1364
 {
3d1364
     double ret;
3d1364
     PERF_ENTRY(acos);
3d1364
@@ -147,7 +147,7 @@ Function:
3d1364
 
3d1364
 See MSDN.
3d1364
 --*/
3d1364
-PALIMPORT double __cdecl PAL_acosh(double x)
3d1364
+PALIMPORT double __cdecl PAL_acosh(double x) THROW_DECL
3d1364
 {
3d1364
     double ret;
3d1364
     PERF_ENTRY(acosh);
3d1364
@@ -166,7 +166,7 @@ Function:
3d1364
 
3d1364
 See MSDN.
3d1364
 --*/
3d1364
-PALIMPORT double __cdecl PAL_asin(double x)
3d1364
+PALIMPORT double __cdecl PAL_asin(double x) THROW_DECL
3d1364
 {
3d1364
     double ret;
3d1364
     PERF_ENTRY(asin);
3d1364
@@ -196,7 +196,7 @@ Function:
3d1364
 
3d1364
 See MSDN.
3d1364
 --*/
3d1364
-PALIMPORT double __cdecl PAL_asinh(double x)
3d1364
+PALIMPORT double __cdecl PAL_asinh(double x) THROW_DECL
3d1364
 {
3d1364
     double ret;
3d1364
     PERF_ENTRY(asinh);
3d1364
@@ -215,7 +215,7 @@ Function:
3d1364
 
3d1364
 See MSDN.
3d1364
 --*/
3d1364
-PALIMPORT double __cdecl PAL_atan2(double y, double x)
3d1364
+PALIMPORT double __cdecl PAL_atan2(double y, double x) THROW_DECL
3d1364
 {
3d1364
     double ret;
3d1364
     PERF_ENTRY(atan2);
3d1364
@@ -255,7 +255,7 @@ Function:
3d1364
 
3d1364
 See MSDN.
3d1364
 --*/
3d1364
-PALIMPORT double __cdecl PAL_exp(double x)
3d1364
+PALIMPORT double __cdecl PAL_exp(double x) THROW_DECL
3d1364
 {
3d1364
     double ret;
3d1364
     PERF_ENTRY(exp);
3d1364
@@ -306,7 +306,7 @@ Function:
3d1364
 
3d1364
 See MSDN.
3d1364
 --*/
3d1364
-PALIMPORT double __cdecl PAL_log(double x)
3d1364
+PALIMPORT double __cdecl PAL_log(double x) THROW_DECL
3d1364
 {
3d1364
     double ret;
3d1364
     PERF_ENTRY(log);
3d1364
@@ -336,7 +336,7 @@ Function:
3d1364
 
3d1364
 See MSDN.
3d1364
 --*/
3d1364
-PALIMPORT double __cdecl PAL_log10(double x)
3d1364
+PALIMPORT double __cdecl PAL_log10(double x) THROW_DECL
3d1364
 {
3d1364
     double ret;
3d1364
     PERF_ENTRY(log10);
3d1364
@@ -366,7 +366,7 @@ Function:
3d1364
 
3d1364
 See MSDN.
3d1364
 --*/
3d1364
-PALIMPORT double __cdecl PAL_pow(double x, double y)
3d1364
+PALIMPORT double __cdecl PAL_pow(double x, double y) THROW_DECL
3d1364
 {
3d1364
     double ret;
3d1364
     PERF_ENTRY(pow);
3d1364
@@ -527,7 +527,7 @@ Function:
3d1364
 
3d1364
 See MSDN.
3d1364
 --*/
3d1364
-PALIMPORT float __cdecl PAL_acosf(float x)
3d1364
+PALIMPORT float __cdecl PAL_acosf(float x) THROW_DECL
3d1364
 {
3d1364
     float ret;
3d1364
     PERF_ENTRY(acosf);
3d1364
@@ -557,7 +557,7 @@ Function:
3d1364
 
3d1364
 See MSDN.
3d1364
 --*/
3d1364
-PALIMPORT float __cdecl PAL_acoshf(float x)
3d1364
+PALIMPORT float __cdecl PAL_acoshf(float x) THROW_DECL
3d1364
 {
3d1364
     float ret;
3d1364
     PERF_ENTRY(acoshf);
3d1364
@@ -576,7 +576,7 @@ Function:
3d1364
 
3d1364
 See MSDN.
3d1364
 --*/
3d1364
-PALIMPORT float __cdecl PAL_asinf(float x)
3d1364
+PALIMPORT float __cdecl PAL_asinf(float x) THROW_DECL
3d1364
 {
3d1364
     float ret;
3d1364
     PERF_ENTRY(asinf);
3d1364
@@ -606,7 +606,7 @@ Function:
3d1364
 
3d1364
 See MSDN.
3d1364
 --*/
3d1364
-PALIMPORT float __cdecl PAL_asinhf(float x)
3d1364
+PALIMPORT float __cdecl PAL_asinhf(float x) THROW_DECL
3d1364
 {
3d1364
     float ret;
3d1364
     PERF_ENTRY(asinhf);
3d1364
@@ -626,7 +626,7 @@ Function:
3d1364
 
3d1364
 See MSDN.
3d1364
 --*/
3d1364
-PALIMPORT float __cdecl PAL_atan2f(float y, float x)
3d1364
+PALIMPORT float __cdecl PAL_atan2f(float y, float x) THROW_DECL
3d1364
 {
3d1364
     float ret;
3d1364
     PERF_ENTRY(atan2f);
3d1364
@@ -666,7 +666,7 @@ Function:
3d1364
 
3d1364
 See MSDN.
3d1364
 --*/
3d1364
-PALIMPORT float __cdecl PAL_expf(float x)
3d1364
+PALIMPORT float __cdecl PAL_expf(float x) THROW_DECL
3d1364
 {
3d1364
     float ret;
3d1364
     PERF_ENTRY(expf);
3d1364
@@ -698,7 +698,7 @@ Function:
3d1364
 
3d1364
 See MSDN.
3d1364
 --*/
3d1364
-PALIMPORT float __cdecl PAL_logf(float x)
3d1364
+PALIMPORT float __cdecl PAL_logf(float x) THROW_DECL
3d1364
 {
3d1364
     float ret;
3d1364
     PERF_ENTRY(logf);
3d1364
@@ -728,7 +728,7 @@ Function:
3d1364
 
3d1364
 See MSDN.
3d1364
 --*/
3d1364
-PALIMPORT float __cdecl PAL_log10f(float x)
3d1364
+PALIMPORT float __cdecl PAL_log10f(float x) THROW_DECL
3d1364
 {
3d1364
     float ret;
3d1364
     PERF_ENTRY(log10f);
3d1364
@@ -758,7 +758,7 @@ Function:
3d1364
 
3d1364
 See MSDN.
3d1364
 --*/
3d1364
-PALIMPORT float __cdecl PAL_powf(float x, float y)
3d1364
+PALIMPORT float __cdecl PAL_powf(float x, float y) THROW_DECL
3d1364
 {
3d1364
     float ret;
3d1364
     PERF_ENTRY(powf);
3d1364
diff --git a/src/pal/src/safecrt/memcpy_s.cpp b/src/pal/src/safecrt/memcpy_s.cpp
3d1364
index 27aeb79665..a75ec41861 100644
3d1364
--- a/src/pal/src/safecrt/memcpy_s.cpp
3d1364
+++ b/src/pal/src/safecrt/memcpy_s.cpp
3d1364
@@ -54,7 +54,7 @@ errno_t __cdecl memcpy_s(
3d1364
     size_t sizeInBytes,
3d1364
     const void * src,
3d1364
     size_t count
3d1364
-)
3d1364
+) THROW_DECL
3d1364
 {
3d1364
     if (count == 0)
3d1364
     {