We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cd610b8 + 35ea326 commit 300bd98Copy full SHA for 300bd98
stdlib/public/stubs/Stubs.cpp
@@ -506,7 +506,12 @@ __swift_bool swift_stdlib_isStackAllocationSafe(__swift_size_t byteCount,
506
507
__swift_bool _swift_stdlib_getCurrentStackBounds(__swift_uintptr_t *outBegin,
508
__swift_uintptr_t *outEnd) {
509
-#if defined(__APPLE__)
+#if defined(SWIFT_STDLIB_SINGLE_THREADED_RUNTIME)
510
+ // This platform does not support threads, so the API we'd call to get stack
511
+ // bounds (i.e. libpthread) is not going to be usable.
512
+ return false;
513
+
514
+#elif defined(__APPLE__)
515
pthread_t thread = pthread_self();
516
// On Apple platforms, the stack grows down, so that the end of the stack
517
// comes before the beginning on the number line, and an address on the stack
0 commit comments