]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/libffi/win32-disable-stackframe-check.patch
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / libffi / win32-disable-stackframe-check.patch
1 diff --git a/src/x86/ffi.c b/src/x86/ffi.c
2 index 9a59218..9f5d703 100644
3 --- a/src/x86/ffi.c
4 +++ b/src/x86/ffi.c
5 @@ -255,6 +255,14 @@ static const struct abi_params abi_params[FFI_LAST_ABI] = {
6
7 extern void FFI_DECLARE_FASTCALL ffi_call_i386(struct call_frame *, char *) FFI_HIDDEN;
8
9 +/* we perform some black magic here to use some of the parent's
10 + * stack frame in ff_call_win() that breaks with the msvc compiler
11 + * with the /RTCs or /GZ flags. Disable the 'Stack frame run time
12 + * error checking' for this function so we don't hit weird exceptions
13 + * in debug builds */
14 +#if defined(_MSC_VER)
15 +#pragma runtime_checks("s", off)
16 +#endif
17 static void
18 ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue,
19 void **avalue, void *closure)
20 @@ -390,6 +398,9 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue,
21
22 ffi_call_i386 (frame, stack);
23 }
24 +#if defined(_MSC_VER)
25 +#pragma runtime_checks("s", restore)
26 +#endif
27
28 void
29 ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)