Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
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.
  • Loading branch information
Yhg1s committed Oct 16, 2026
commit e78cfd2c627eca892e21102176cb57b0a86f14bb
5 changes: 2 additions & 3 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,8 @@ hardware_stack_limits(uintptr_t *base, uintptr_t *top, uintptr_t sp)
# ifdef HAVE_UNRELIABLE_PTHREAD_GETATTR_NP
/* pthread_getattr_np on the main thread of a musl process reports a
* stack size based on the current stack rather than RLIMIT_STACK.
* New threads pass their size to pthread_attr_setstacksize and are
* reported correctly even on musl, so this fallback only applies to
* the main thread. */
* New threads are reported correctly even on musl, so this fallback
* only applies to the main thread. */
if ((pid_t)syscall(SYS_gettid) == getpid()) {
struct rlimit rl;
if (getrlimit(RLIMIT_STACK, &rl) == 0 &&
Expand Down
Loading