diff --git a/sdk/core/azure-core-tracing-opentelemetry/inc/ApiViewSettings.json b/sdk/core/azure-core-tracing-opentelemetry/inc/ApiViewSettings.json new file mode 100644 index 000000000..66c0aa258 --- /dev/null +++ b/sdk/core/azure-core-tracing-opentelemetry/inc/ApiViewSettings.json @@ -0,0 +1,19 @@ +{ + "sourceFilesToProcess": null, + "sourceFilesToSkip": [ + ], + "additionalIncludeDirectories": [ + "../../azure-core/inc" + ], + "additionalCompilerSwitches": [ + "-D_azure_APIVIEW", + "-D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH" + ], + "allowInternal": true, + "includeDetail": false, + "includePrivate": false, + "filterNamespace": "Azure::", + "reviewName": "Azure Core Tracing Open-Telemetry API Review", + "serviceName": null, + "packageName": "azure-core-tracing-opentelemetry-cpp" +} diff --git a/sdk/core/azure-core/inc/ApiViewSettings.json b/sdk/core/azure-core/inc/ApiViewSettings.json index 16faf134e..d9f6010ed 100644 --- a/sdk/core/azure-core/inc/ApiViewSettings.json +++ b/sdk/core/azure-core/inc/ApiViewSettings.json @@ -9,7 +9,8 @@ "additionalCompilerSwitches": [ "-DBUILD_CURL_HTTP_TRANSPORT_ADAPTER", "-DBUILD_TRANSPORT_WINHTTP_ADAPTER", - "-DCURL_STATICLIB" + "-DCURL_STATICLIB", + "-D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH" ], "allowInternal": true, "includeDetail": false, diff --git a/sdk/core/azure-core/test/nlohmann-json-test/thirdparty/doctest/doctest.h b/sdk/core/azure-core/test/nlohmann-json-test/thirdparty/doctest/doctest.h index 2f0ff2131..94ea03253 100755 --- a/sdk/core/azure-core/test/nlohmann-json-test/thirdparty/doctest/doctest.h +++ b/sdk/core/azure-core/test/nlohmann-json-test/thirdparty/doctest/doctest.h @@ -3930,6 +3930,8 @@ namespace { struct FatalConditionHandler { void reset() {} + static void allocateAltStackMem() {} + static void freeAltStackMem() {} }; #else // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH @@ -3966,6 +3968,9 @@ namespace { return EXCEPTION_CONTINUE_SEARCH; } + static void allocateAltStackMem() {} + static void freeAltStackMem() {} + FatalConditionHandler() { isSet = true; // 32k seems enough for doctest to handle stack overflow, @@ -4018,7 +4023,8 @@ namespace { static bool isSet; static struct sigaction oldSigActions[DOCTEST_COUNTOF(signalDefs)]; static stack_t oldSigStack; - static char altStackMem[4 * SIGSTKSZ]; + static size_t altStackSize; + static char * altStackMem; static void handleSignal(int sig) { const char* name = ""; @@ -4034,11 +4040,18 @@ namespace { raise(sig); } + static void allocateAltStackMem() { + altStackMem = new char[altStackSize]; + } + static void freeAltStackMem() { + delete[] altStackMem; + } + FatalConditionHandler() { isSet = true; stack_t sigStack; sigStack.ss_sp = altStackMem; - sigStack.ss_size = sizeof(altStackMem); + sigStack.ss_size = altStackSize; sigStack.ss_flags = 0; sigaltstack(&sigStack, &oldSigStack); struct sigaction sa = {}; @@ -4063,10 +4076,12 @@ namespace { } }; - bool FatalConditionHandler::isSet = false; + bool FatalConditionHandler::isSet = false; struct sigaction FatalConditionHandler::oldSigActions[DOCTEST_COUNTOF(signalDefs)] = {}; - stack_t FatalConditionHandler::oldSigStack = {}; - char FatalConditionHandler::altStackMem[] = {}; + stack_t FatalConditionHandler::oldSigStack = {}; + size_t FatalConditionHandler::altStackSize = 4 * SIGSTKSZ; + char * FatalConditionHandler::altStackMem = nullptr; + #endif // DOCTEST_PLATFORM_WINDOWS #endif // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH @@ -5687,7 +5702,10 @@ int Context::run() { p->cout = &fstr; } + FatalConditionHandler::allocateAltStackMem(); + auto cleanup_and_return = [&]() { + FatalConditionHandler::freeAltStackMem(); if(fstr.is_open()) fstr.close();