Skip to content

Commit e78cfd2

Browse files
committed
Fix a comment to make it clear the correctness of pthread_getattr_np doesn't
depend on explicitly setting the stack size. It's correct for new threads regardless of that call.
1 parent 036f753 commit e78cfd2

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎Python/ceval.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,8 @@ hardware_stack_limits(uintptr_t *base, uintptr_t *top, uintptr_t sp)
168168
# ifdef HAVE_UNRELIABLE_PTHREAD_GETATTR_NP
169169
/* pthread_getattr_np on the main thread of a musl process reports a
170170
* stack size based on the current stack rather than RLIMIT_STACK.
171-
* New threads pass their size to pthread_attr_setstacksize and are
172-
* reported correctly even on musl, so this fallback only applies to
173-
* the main thread. */
171+
* New threads are reported correctly even on musl, so this fallback
172+
* only applies to the main thread. */
174173
if ((pid_t)syscall(SYS_gettid) == getpid()) {
175174
struct rlimit rl;
176175
if (getrlimit(RLIMIT_STACK, &rl) == 0 &&

0 commit comments

Comments
 (0)