GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GH-91079: Implement C stack limits using addresses, not counters. by markshannon · Pull Request #130007 · python/cpython

Conversation

@markshannon

@markshannon markshannon commented Feb 11, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Hopefully, this will also fix #113655.

  • Issue: Implement stack overflow protection for supported platforms #91079

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chris-eibl and jokarlove4ever2025 reacted with hooray emoji zooba and jokarlove4ever2025 reacted with heart emoji
All reactions
  • 🎉 2 reactions
  • ❤️ 2 reactions
markshannon added 4 commits February 11, 2025 11:09
@markshannon
Hide that C recursion protection is implemented with a counter. There…
fc910a3
… is an imbalance in the AST somewhere.
@markshannon
Implement C recursion protection with limit pointers
afeb866
@markshannon
Use uintptr_t instead of char * to avoid warnings and UB
22ca169
@markshannon
Merge branch 'main' into c-recursion-limit
e8d8c4b
@bedevere-app bedevere-app Bot mentioned this pull request Feb 11, 2025
Implement stack overflow protection for supported platforms #91079
Closed
@markshannon markshannon closed this Feb 11, 2025
@markshannon markshannon reopened this Feb 11, 2025
markshannon added 23 commits February 11, 2025 16:18
@markshannon
Fix typo and update stable ABI
b3638a5
@markshannon
Tweak AST test numbers
774efb5
@markshannon
Improve logic handling trial C stack overflow
151c88f
@markshannon
Remove calls to PyOS_CheckStack
350f8ec
@markshannon
Up the limits for recursion tests
428c46a
@markshannon
Use deeper stack for test
a9be141
@markshannon
Remove exceeds_recursion_limit and get_c_recursion_limit. Use platfor…
03fc52e
…m independent constants
@markshannon
Do fewer probes when growing stack limit
afac1e6
@markshannon
Tweak depths
9da904d
@markshannon
Merge branch 'main' into c-recursion-limit
a802ff6
@markshannon
Perform lazy initialization of c recursion check
dbcf6f0
@markshannon
Post merge fixup
2cc3287
@markshannon
Up depth again
e697926
@markshannon
Drop 'failing' depth
f8a9143
@markshannon
Add news
7d6d77f
@markshannon
Increase headroom
31a83dc
@markshannon
Update test
47c50aa
@markshannon
Tweak some more thresholds and tests
495c4ea
@markshannon
Add stack protection to parser
9e0cc67
@markshannon
Make tests more robust to low stacks
857a7bb
@markshannon
Improve error messages for stack overflow
9c9326a
@markshannon
Merge branch 'main' into c-recursion-limit
75d3219
@markshannon
Fix formatting
3e41b46
@bedevere-app
bedevere-app Bot requested review from encukou and iritkatriel February 18, 2025 16:02
encukou
encukou approved these changes Feb 19, 2025
View reviewed changes

@encukou encukou left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great now, thank you!

Would you be OK with me asking the SC to remove Py_C_RECURSION_LIMIT (and c_recursion_remaining) without deprecation? IMO it's the right thing to do here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting change review labels Feb 19, 2025
@markshannon

markshannon commented Feb 19, 2025

Copy link
Copy Markdown
Member Author

Would you be OK with me asking the SC to remove Py_C_RECURSION_LIMIT (and c_recursion_remaining) without deprecation? IMO it's the right thing to do here.

Sure, go ahead.

I was thinking that we should deprecate the whole of struct _ts (the thread state struct), but that probably needs a bit more discussion and it might be tricky to deprecate the struct, but still allow pointers to it in the API.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@markshannon
Merge branch 'main' into c-recursion-limit
33e11c8
@markshannon
markshannon merged commit 2498c22 into python:main Feb 19, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Feb 19, 2025
@bedevere-bot

bedevere-bot commented Feb 19, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot wasm32-wasi 3.x has failed when building commit 2498c22.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1046/builds/7562) and take a look at the build logs.
  4. Check if the failure is related to this commit (2498c22) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1046/builds/7562

Failed tests:

  • test_call

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 142, done.        
remote: Counting objects:   0% (1/142)        
remote: Counting objects:   1% (2/142)        
remote: Counting objects:   2% (3/142)        
remote: Counting objects:   3% (5/142)        
remote: Counting objects:   4% (6/142)        
remote: Counting objects:   5% (8/142)        
remote: Counting objects:   6% (9/142)        
remote: Counting objects:   7% (10/142)        
remote: Counting objects:   8% (12/142)        
remote: Counting objects:   9% (13/142)        
remote: Counting objects:  10% (15/142)        
remote: Counting objects:  11% (16/142)        
remote: Counting objects:  12% (18/142)        
remote: Counting objects:  13% (19/142)        
remote: Counting objects:  14% (20/142)        
remote: Counting objects:  15% (22/142)        
remote: Counting objects:  16% (23/142)        
remote: Counting objects:  17% (25/142)        
remote: Counting objects:  18% (26/142)        
remote: Counting objects:  19% (27/142)        
remote: Counting objects:  20% (29/142)        
remote: Counting objects:  21% (30/142)        
remote: Counting objects:  22% (32/142)        
remote: Counting objects:  23% (33/142)        
remote: Counting objects:  24% (35/142)        
remote: Counting objects:  25% (36/142)        
remote: Counting objects:  26% (37/142)        
remote: Counting objects:  27% (39/142)        
remote: Counting objects:  28% (40/142)        
remote: Counting objects:  29% (42/142)        
remote: Counting objects:  30% (43/142)        
remote: Counting objects:  31% (45/142)        
remote: Counting objects:  32% (46/142)        
remote: Counting objects:  33% (47/142)        
remote: Counting objects:  34% (49/142)        
remote: Counting objects:  35% (50/142)        
remote: Counting objects:  36% (52/142)        
remote: Counting objects:  37% (53/142)        
remote: Counting objects:  38% (54/142)        
remote: Counting objects:  39% (56/142)        
remote: Counting objects:  40% (57/142)        
remote: Counting objects:  41% (59/142)        
remote: Counting objects:  42% (60/142)        
remote: Counting objects:  43% (62/142)        
remote: Counting objects:  44% (63/142)        
remote: Counting objects:  45% (64/142)        
remote: Counting objects:  46% (66/142)        
remote: Counting objects:  47% (67/142)        
remote: Counting objects:  48% (69/142)        
remote: Counting objects:  49% (70/142)        
remote: Counting objects:  50% (71/142)        
remote: Counting objects:  51% (73/142)        
remote: Counting objects:  52% (74/142)        
remote: Counting objects:  53% (76/142)        
remote: Counting objects:  54% (77/142)        
remote: Counting objects:  55% (79/142)        
remote: Counting objects:  56% (80/142)        
remote: Counting objects:  57% (81/142)        
remote: Counting objects:  58% (83/142)        
remote: Counting objects:  59% (84/142)        
remote: Counting objects:  60% (86/142)        
remote: Counting objects:  61% (87/142)        
remote: Counting objects:  62% (89/142)        
remote: Counting objects:  63% (90/142)        
remote: Counting objects:  64% (91/142)        
remote: Counting objects:  65% (93/142)        
remote: Counting objects:  66% (94/142)        
remote: Counting objects:  67% (96/142)        
remote: Counting objects:  68% (97/142)        
remote: Counting objects:  69% (98/142)        
remote: Counting objects:  70% (100/142)        
remote: Counting objects:  71% (101/142)        
remote: Counting objects:  72% (103/142)        
remote: Counting objects:  73% (104/142)        
remote: Counting objects:  74% (106/142)        
remote: Counting objects:  75% (107/142)        
remote: Counting objects:  76% (108/142)        
remote: Counting objects:  77% (110/142)        
remote: Counting objects:  78% (111/142)        
remote: Counting objects:  79% (113/142)        
remote: Counting objects:  80% (114/142)        
remote: Counting objects:  81% (116/142)        
remote: Counting objects:  82% (117/142)        
remote: Counting objects:  83% (118/142)        
remote: Counting objects:  84% (120/142)        
remote: Counting objects:  85% (121/142)        
remote: Counting objects:  86% (123/142)        
remote: Counting objects:  87% (124/142)        
remote: Counting objects:  88% (125/142)        
remote: Counting objects:  89% (127/142)        
remote: Counting objects:  90% (128/142)        
remote: Counting objects:  91% (130/142)        
remote: Counting objects:  92% (131/142)        
remote: Counting objects:  93% (133/142)        
remote: Counting objects:  94% (134/142)        
remote: Counting objects:  95% (135/142)        
remote: Counting objects:  96% (137/142)        
remote: Counting objects:  97% (138/142)        
remote: Counting objects:  98% (140/142)        
remote: Counting objects:  99% (141/142)        
remote: Counting objects: 100% (142/142)        
remote: Counting objects: 100% (142/142), done.        
remote: Compressing objects:   1% (1/62)        
remote: Compressing objects:   3% (2/62)        
remote: Compressing objects:   4% (3/62)        
remote: Compressing objects:   6% (4/62)        
remote: Compressing objects:   8% (5/62)        
remote: Compressing objects:   9% (6/62)        
remote: Compressing objects:  11% (7/62)        
remote: Compressing objects:  12% (8/62)        
remote: Compressing objects:  14% (9/62)        
remote: Compressing objects:  16% (10/62)        
remote: Compressing objects:  17% (11/62)        
remote: Compressing objects:  19% (12/62)        
remote: Compressing objects:  20% (13/62)        
remote: Compressing objects:  22% (14/62)        
remote: Compressing objects:  24% (15/62)        
remote: Compressing objects:  25% (16/62)        
remote: Compressing objects:  27% (17/62)        
remote: Compressing objects:  29% (18/62)        
remote: Compressing objects:  30% (19/62)        
remote: Compressing objects:  32% (20/62)        
remote: Compressing objects:  33% (21/62)        
remote: Compressing objects:  35% (22/62)        
remote: Compressing objects:  37% (23/62)        
remote: Compressing objects:  38% (24/62)        
remote: Compressing objects:  40% (25/62)        
remote: Compressing objects:  41% (26/62)        
remote: Compressing objects:  43% (27/62)        
remote: Compressing objects:  45% (28/62)        
remote: Compressing objects:  46% (29/62)        
remote: Compressing objects:  48% (30/62)        
remote: Compressing objects:  50% (31/62)        
remote: Compressing objects:  51% (32/62)        
remote: Compressing objects:  53% (33/62)        
remote: Compressing objects:  54% (34/62)        
remote: Compressing objects:  56% (35/62)        
remote: Compressing objects:  58% (36/62)        
remote: Compressing objects:  59% (37/62)        
remote: Compressing objects:  61% (38/62)        
remote: Compressing objects:  62% (39/62)        
remote: Compressing objects:  64% (40/62)        
remote: Compressing objects:  66% (41/62)        
remote: Compressing objects:  67% (42/62)        
remote: Compressing objects:  69% (43/62)        
remote: Compressing objects:  70% (44/62)        
remote: Compressing objects:  72% (45/62)        
remote: Compressing objects:  74% (46/62)        
remote: Compressing objects:  75% (47/62)        
remote: Compressing objects:  77% (48/62)        
remote: Compressing objects:  79% (49/62)        
remote: Compressing objects:  80% (50/62)        
remote: Compressing objects:  82% (51/62)        
remote: Compressing objects:  83% (52/62)        
remote: Compressing objects:  85% (53/62)        
remote: Compressing objects:  87% (54/62)        
remote: Compressing objects:  88% (55/62)        
remote: Compressing objects:  90% (56/62)        
remote: Compressing objects:  91% (57/62)        
remote: Compressing objects:  93% (58/62)        
remote: Compressing objects:  95% (59/62)        
remote: Compressing objects:  96% (60/62)        
remote: Compressing objects:  98% (61/62)        
remote: Compressing objects: 100% (62/62)        
remote: Compressing objects: 100% (62/62), done.        
remote: Total 72 (delta 70), reused 11 (delta 10), pack-reused 0 (from 0)        
From https://github.com/python/cpython
 * branch                    main       -> FETCH_HEAD
Note: switching to '2498c22fa0a2b560491bc503fa676585c1a603d0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 2498c22fa0a GH-91079: Implement C stack limits using addresses, not counters. (GH-130007)
Switched to and reset branch 'main'

configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)

configure: WARNING: using cross tools not prefixed with host triplet
configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)
../../configure: line 32078: test: : integer expression expected
../../configure: line 32153: test: : integer expression expected

In file included from ../../Python/ceval.c:946:
../../Python/generated_cases.c.h:6522:41: warning: code will never be executed [-Wunreachable-code]
 6522 |                     stack_pointer[-1] = kwnames;
      |                                         ^~~~~~~
../../Python/generated_cases.c.h:6116:21: warning: code will never be executed [-Wunreachable-code]
 6116 |                     _PyFrame_SetStackPointer(frame, stack_pointer);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~
../../Python/generated_cases.c.h:3814:21: warning: code will never be executed [-Wunreachable-code]
 3814 |                     _PyFrame_SetStackPointer(frame, stack_pointer);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~
../../Python/generated_cases.c.h:3477:21: warning: code will never be executed [-Wunreachable-code]
 3477 |                     _PyFrame_SetStackPointer(frame, stack_pointer);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~
../../Python/generated_cases.c.h:3355:21: warning: code will never be executed [-Wunreachable-code]
 3355 |                     _PyFrame_SetStackPointer(frame, stack_pointer);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~
../../Python/generated_cases.c.h:2984:21: warning: code will never be executed [-Wunreachable-code]
 2984 |                     _PyFrame_SetStackPointer(frame, stack_pointer);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~
../../Python/generated_cases.c.h:2716:41: warning: code will never be executed [-Wunreachable-code]
 2716 |                     stack_pointer[-1] = kwnames;
      |                                         ^~~~~~~
../../Python/generated_cases.c.h:2112:21: warning: code will never be executed [-Wunreachable-code]
 2112 |                     _PyFrame_SetStackPointer(frame, stack_pointer);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~
../../Python/generated_cases.c.h:1992:21: warning: code will never be executed [-Wunreachable-code]
 1992 |                     _PyFrame_SetStackPointer(frame, stack_pointer);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~
../../Python/generated_cases.c.h:1880:21: warning: code will never be executed [-Wunreachable-code]
 1880 |                     _PyFrame_SetStackPointer(frame, stack_pointer);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~
../../Python/generated_cases.c.h:1352:21: warning: code will never be executed [-Wunreachable-code]
 1352 |                     _PyFrame_SetStackPointer(frame, stack_pointer);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~
../../Python/generated_cases.c.h:1187:17: warning: code will never be executed [-Wunreachable-code]
 1187 |                 _PyFrame_SetStackPointer(frame, stack_pointer);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
../../Python/generated_cases.c.h:1042:17: warning: code will never be executed [-Wunreachable-code]
 1042 |                 _PyFrame_SetStackPointer(frame, stack_pointer);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
13 warnings generated.
In file included from ../../Modules/md5module.c:46:
In file included from ../../Modules/_hacl/Hacl_Hash_MD5.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:130:11: warning: 'htole32' macro redefined [-Wmacro-redefined]
  130 | #  define htole32(x) (x)
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:43:9: note: previous definition is here
   43 | #define htole32(x) (uint32_t)(x)
      |         ^
In file included from ../../Modules/md5module.c:46:
In file included from ../../Modules/_hacl/Hacl_Hash_MD5.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:131:11: warning: 'le32toh' macro redefined [-Wmacro-redefined]
  131 | #  define le32toh(x) (x)
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:44:9: note: previous definition is here
   44 | #define le32toh(x) (uint32_t)(x)
      |         ^
In file included from ../../Modules/md5module.c:46:
In file included from ../../Modules/_hacl/Hacl_Hash_MD5.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:132:11: warning: 'htobe32' macro redefined [-Wmacro-redefined]
  132 | #  define htobe32(x)                                                           \
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:37:9: note: previous definition is here
   37 | #define htobe32(x) __bswap32(x)
      |         ^
In file included from ../../Modules/md5module.c:46:
In file included from ../../Modules/_hacl/Hacl_Hash_MD5.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:138:11: warning: 'be32toh' macro redefined [-Wmacro-redefined]
  138 | #  define be32toh(x) (htobe32((x)))
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:38:9: note: previous definition is here
   38 | #define be32toh(x) __bswap32(x)
      |         ^
In file included from ../../Modules/md5module.c:46:
In file included from ../../Modules/_hacl/Hacl_Hash_MD5.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:140:11: warning: 'htole64' macro redefined [-Wmacro-redefined]
  140 | #  define htole64(x) (x)
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:45:9: note: previous definition is here
   45 | #define htole64(x) (uint64_t)(x)
      |         ^
In file included from ../../Modules/md5module.c:46:
In file included from ../../Modules/_hacl/Hacl_Hash_MD5.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:141:11: warning: 'le64toh' macro redefined [-Wmacro-redefined]
  141 | #  define le64toh(x) (x)
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:46:9: note: previous definition is here
   46 | #define le64toh(x) (uint64_t)(x)
      |         ^
In file included from ../../Modules/md5module.c:46:
In file included from ../../Modules/_hacl/Hacl_Hash_MD5.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:142:11: warning: 'htobe64' macro redefined [-Wmacro-redefined]
  142 | #  define htobe64(x)                                                           \
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:39:9: note: previous definition is here
   39 | #define htobe64(x) __bswap64(x)
      |         ^
In file included from ../../Modules/md5module.c:46:
In file included from ../../Modules/_hacl/Hacl_Hash_MD5.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:149:11: warning: 'be64toh' macro redefined [-Wmacro-redefined]
  149 | #  define be64toh(x) (htobe64((x)))
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:40:9: note: previous definition is here
   40 | #define be64toh(x) __bswap64(x)
      |         ^
8 warnings generated.
In file included from ../../Modules/sha1module.c:47:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA1.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:130:11: warning: 'htole32' macro redefined [-Wmacro-redefined]
  130 | #  define htole32(x) (x)
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:43:9: note: previous definition is here
   43 | #define htole32(x) (uint32_t)(x)
      |         ^
In file included from ../../Modules/sha1module.c:47:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA1.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:131:11: warning: 'le32toh' macro redefined [-Wmacro-redefined]
  131 | #  define le32toh(x) (x)
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:44:9: note: previous definition is here
   44 | #define le32toh(x) (uint32_t)(x)
      |         ^
In file included from ../../Modules/sha1module.c:47:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA1.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:132:11: warning: 'htobe32' macro redefined [-Wmacro-redefined]
  132 | #  define htobe32(x)                                                           \
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:37:9: note: previous definition is here
   37 | #define htobe32(x) __bswap32(x)
      |         ^
In file included from ../../Modules/sha1module.c:47:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA1.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:138:11: warning: 'be32toh' macro redefined [-Wmacro-redefined]
  138 | #  define be32toh(x) (htobe32((x)))
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:38:9: note: previous definition is here
   38 | #define be32toh(x) __bswap32(x)
      |         ^
In file included from ../../Modules/sha1module.c:47:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA1.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:140:11: warning: 'htole64' macro redefined [-Wmacro-redefined]
  140 | #  define htole64(x) (x)
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:45:9: note: previous definition is here
   45 | #define htole64(x) (uint64_t)(x)
      |         ^
In file included from ../../Modules/sha1module.c:47:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA1.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:141:11: warning: 'le64toh' macro redefined [-Wmacro-redefined]
  141 | #  define le64toh(x) (x)
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:46:9: note: previous definition is here
   46 | #define le64toh(x) (uint64_t)(x)
      |         ^
In file included from ../../Modules/sha1module.c:47:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA1.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:142:11: warning: 'htobe64' macro redefined [-Wmacro-redefined]
  142 | #  define htobe64(x)                                                           \
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:39:9: note: previous definition is here
   39 | #define htobe64(x) __bswap64(x)
      |         ^
In file included from ../../Modules/sha1module.c:47:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA1.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:149:11: warning: 'be64toh' macro redefined [-Wmacro-redefined]
  149 | #  define be64toh(x) (htobe64((x)))
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:40:9: note: previous definition is here
   40 | #define be64toh(x) __bswap64(x)
      |         ^
8 warnings generated.
In file included from ../../Modules/sha3module.c:59:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA3.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:130:11: warning: 'htole32' macro redefined [-Wmacro-redefined]
  130 | #  define htole32(x) (x)
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:43:9: note: previous definition is here
   43 | #define htole32(x) (uint32_t)(x)
      |         ^
In file included from ../../Modules/sha3module.c:59:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA3.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:131:11: warning: 'le32toh' macro redefined [-Wmacro-redefined]
  131 | #  define le32toh(x) (x)
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:44:9: note: previous definition is here
   44 | #define le32toh(x) (uint32_t)(x)
      |         ^
In file included from ../../Modules/sha3module.c:59:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA3.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:132:11: warning: 'htobe32' macro redefined [-Wmacro-redefined]
  132 | #  define htobe32(x)                                                           \
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:37:9: note: previous definition is here
   37 | #define htobe32(x) __bswap32(x)
      |         ^
In file included from ../../Modules/sha3module.c:59:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA3.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:138:11: warning: 'be32toh' macro redefined [-Wmacro-redefined]
  138 | #  define be32toh(x) (htobe32((x)))
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:38:9: note: previous definition is here
   38 | #define be32toh(x) __bswap32(x)
      |         ^
In file included from ../../Modules/sha3module.c:59:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA3.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:140:11: warning: 'htole64' macro redefined [-Wmacro-redefined]
  140 | #  define htole64(x) (x)
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:45:9: note: previous definition is here
   45 | #define htole64(x) (uint64_t)(x)
      |         ^
In file included from ../../Modules/sha3module.c:59:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA3.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:141:11: warning: 'le64toh' macro redefined [-Wmacro-redefined]
  141 | #  define le64toh(x) (x)
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:46:9: note: previous definition is here
   46 | #define le64toh(x) (uint64_t)(x)
      |         ^
In file included from ../../Modules/sha3module.c:59:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA3.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:142:11: warning: 'htobe64' macro redefined [-Wmacro-redefined]
  142 | #  define htobe64(x)                                                           \
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:39:9: note: previous definition is here
   39 | #define htobe64(x) __bswap64(x)
      |         ^
In file included from ../../Modules/sha3module.c:59:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA3.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:149:11: warning: 'be64toh' macro redefined [-Wmacro-redefined]
  149 | #  define be64toh(x) (htobe64((x)))
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:40:9: note: previous definition is here
   40 | #define be64toh(x) __bswap64(x)
      |         ^
8 warnings generated.
../../Modules/_hacl/Lib_Memzero0.c:52:6: warning: "Your platform does not support any safe implementation of memzero -- consider a pull request!" [-W#warnings]
   52 |     #warning "Your platform does not support any safe implementation of memzero -- consider a pull request!"
      |      ^
../../Modules/_hacl/Lib_Memzero0.c:40:10: warning: unused variable 'len_' [-Wunused-variable]
   40 |   size_t len_ = (size_t) len;
      |          ^~~~
2 warnings generated.
../../Modules/expat/xmlparse.c:7870:11: warning: format specifies type 'int' but the argument has type 'ptrdiff_t' (aka 'long') [-Wformat]
 7869 |           " (+" EXPAT_FMT_PTRDIFF_T("6") " bytes %s|%u, xmlparse.c:%d) %*s\"",
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~
 7870 |           bytesMore, (account == XML_ACCOUNT_DIRECT) ? "DIR" : "EXP",
      |           ^~~~~~~~~
1 warning generated.
../../Modules/_testcapimodule.c:2422:13: warning: unused function 'finalize_thread_hang_cleanup_callback' [-Wunused-function]
 2422 | static void finalize_thread_hang_cleanup_callback(void *Py_UNUSED(arg)) {
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
../../Modules/_testcapi/long.c:231:28: warning: comparison of integers of different signs: 'long' and 'digit' (aka 'unsigned int') [-Wsign-compare]
  231 |         if (num < 0 || num >= PyLong_BASE) {
      |                        ~~~ ^  ~~~~~~~~~~~
1 warning generated.
In file included from ../../Modules/sha2module.c:48:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA2.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:130:11: warning: 'htole32' macro redefined [-Wmacro-redefined]
  130 | #  define htole32(x) (x)
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:43:9: note: previous definition is here
   43 | #define htole32(x) (uint32_t)(x)
      |         ^
In file included from ../../Modules/sha2module.c:48:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA2.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:131:11: warning: 'le32toh' macro redefined [-Wmacro-redefined]
  131 | #  define le32toh(x) (x)
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:44:9: note: previous definition is here
   44 | #define le32toh(x) (uint32_t)(x)
      |         ^
In file included from ../../Modules/sha2module.c:48:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA2.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:132:11: warning: 'htobe32' macro redefined [-Wmacro-redefined]
  132 | #  define htobe32(x)                                                           \
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:37:9: note: previous definition is here
   37 | #define htobe32(x) __bswap32(x)
      |         ^
In file included from ../../Modules/sha2module.c:48:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA2.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:138:11: warning: 'be32toh' macro redefined [-Wmacro-redefined]
  138 | #  define be32toh(x) (htobe32((x)))
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:38:9: note: previous definition is here
   38 | #define be32toh(x) __bswap32(x)
      |         ^
In file included from ../../Modules/sha2module.c:48:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA2.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:140:11: warning: 'htole64' macro redefined [-Wmacro-redefined]
  140 | #  define htole64(x) (x)
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:45:9: note: previous definition is here
   45 | #define htole64(x) (uint64_t)(x)
      |         ^
In file included from ../../Modules/sha2module.c:48:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA2.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:141:11: warning: 'le64toh' macro redefined [-Wmacro-redefined]
  141 | #  define le64toh(x) (x)
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:46:9: note: previous definition is here
   46 | #define le64toh(x) (uint64_t)(x)
      |         ^
In file included from ../../Modules/sha2module.c:48:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA2.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:142:11: warning: 'htobe64' macro redefined [-Wmacro-redefined]
  142 | #  define htobe64(x)                                                           \
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:39:9: note: previous definition is here
   39 | #define htobe64(x) __bswap64(x)
      |         ^
In file included from ../../Modules/sha2module.c:48:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA2.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:149:11: warning: 'be64toh' macro redefined [-Wmacro-redefined]
  149 | #  define be64toh(x) (htobe64((x)))
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:40:9: note: previous definition is here
   40 | #define be64toh(x) __bswap64(x)
      |         ^
In file included from ../../Modules/blake2module.c:136:
In file included from ../../Modules/_hacl/Hacl_Hash_Blake2b.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:130:11: warning: 'htole32' macro redefined [-Wmacro-redefined]
  130 | #  define htole32(x) (x)
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:43:9: note: previous definition is here
   43 | #define htole32(x) (uint32_t)(x)
      |         ^
In file included from ../../Modules/blake2module.c:136:
In file included from ../../Modules/_hacl/Hacl_Hash_Blake2b.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:131:11: warning: 'le32toh' macro redefined [-Wmacro-redefined]
  131 | #  define le32toh(x) (x)
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:44:9: note: previous definition is here
   44 | #define le32toh(x) (uint32_t)(x)
      |         ^
In file included from ../../Modules/blake2module.c:136:
In file included from ../../Modules/_hacl/Hacl_Hash_Blake2b.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:132:11: warning: 'htobe32' macro redefined [-Wmacro-redefined]
  132 | #  define htobe32(x)                                                           \
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:37:9: note: previous definition is here
   37 | #define htobe32(x) __bswap32(x)
      |         ^
In file included from ../../Modules/blake2module.c:136:
In file included from ../../Modules/_hacl/Hacl_Hash_Blake2b.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:138:11: warning: 'be32toh' macro redefined [-Wmacro-redefined]
  138 | #  define be32toh(x) (htobe32((x)))
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:38:9: note: previous definition is here
   38 | #define be32toh(x) __bswap32(x)
      |         ^
In file included from ../../Modules/blake2module.c:136:
In file included from ../../Modules/_hacl/Hacl_Hash_Blake2b.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:140:11: warning: 'htole64' macro redefined [-Wmacro-redefined]
  140 | #  define htole64(x) (x)
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:45:9: note: previous definition is here
   45 | #define htole64(x) (uint64_t)(x)
      |         ^
In file included from ../../Modules/blake2module.c:136:
In file included from ../../Modules/_hacl/Hacl_Hash_Blake2b.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:141:11: warning: 'le64toh' macro redefined [-Wmacro-redefined]
  141 | #  define le64toh(x) (x)
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:46:9: note: previous definition is here
   46 | #define le64toh(x) (uint64_t)(x)
      |         ^
In file included from ../../Modules/blake2module.c:136:
In file included from ../../Modules/_hacl/Hacl_Hash_Blake2b.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:142:11: warning: 'htobe64' macro redefined [-Wmacro-redefined]
  142 | #  define htobe64(x)                                                           \
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:39:9: note: previous definition is here
   39 | #define htobe64(x) __bswap64(x)
      |         ^
In file included from ../../Modules/blake2module.c:136:
In file included from ../../Modules/_hacl/Hacl_Hash_Blake2b.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:149:11: warning: 'be64toh' macro redefined [-Wmacro-redefined]
  149 | #  define be64toh(x) (htobe64((x)))
      |           ^
/opt/wasi-sdk-21.0/bin/../share/wasi-sysroot/include/endian.h:40:9: note: previous definition is here
   40 | #define be64toh(x) __bswap64(x)
      |         ^
8 warnings generated.
8 warnings generated.

make: *** [Makefile:2294: buildbottest] Error 2

Cannot open file '/home/buildbot/buildarea/3.x.bcannon-wasi.wasi.debug/build/build/cross-build/wasm32-wasip1/test-results.xml' for upload
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Feb 19, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Windows Server 2022 NoGIL 3.x has failed when building commit 2498c22.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1241/builds/4656) and take a look at the build logs.
  4. Check if the failure is related to this commit (2498c22) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1241/builds/4656

Failed tests:

  • test_capi

Failed subtests:

  • test_trashcan_python_class1 - test.test_capi.test_misc.CAPITest.test_trashcan_python_class1
  • test_trashcan_python_class2 - test.test_capi.test_misc.CAPITest.test_trashcan_python_class2

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "C:\Users\Administrator\buildarea\3.x.itamaro-win64-srv-22-aws.x64.nogil\build\Lib\test\test_capi\test_misc.py", line 421, in test_trashcan_python_class2
    self.do_test_trashcan_python_class(MyList)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "C:\Users\Administrator\buildarea\3.x.itamaro-win64-srv-22-aws.x64.nogil\build\Lib\test\test_capi\test_misc.py", line 449, in do_test_trashcan_python_class
    self.assertEqual(PyList.num, 0)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
AssertionError: 32295 != 0


Traceback (most recent call last):
  File "<string>", line 10, in <module>
  File "<frozen importlib._bootstrap>", line 813, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1056, in create_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
ImportError: module _test_module_state_shared does not support loading in subinterpreters
xpected failure


Traceback (most recent call last):
  File "C:\Users\Administrator\buildarea\3.x.itamaro-win64-srv-22-aws.x64.nogil\build\Lib\test\test_capi\test_misc.py", line 416, in test_trashcan_python_class1
    self.do_test_trashcan_python_class(list)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "C:\Users\Administrator\buildarea\3.x.itamaro-win64-srv-22-aws.x64.nogil\build\Lib\test\test_capi\test_misc.py", line 449, in do_test_trashcan_python_class
    self.assertEqual(PyList.num, 0)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
AssertionError: 30365 != 0


Traceback (most recent call last):
  File "C:\Users\Administrator\buildarea\3.x.itamaro-win64-srv-22-aws.x64.nogil\build\Lib\test\test_capi\test_misc.py", line 416, in test_trashcan_python_class1
    self.do_test_trashcan_python_class(list)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "C:\Users\Administrator\buildarea\3.x.itamaro-win64-srv-22-aws.x64.nogil\build\Lib\test\test_capi\test_misc.py", line 449, in do_test_trashcan_python_class
    self.assertEqual(PyList.num, 0)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
AssertionError: 60728 != 0
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brettcannon

brettcannon commented Feb 19, 2025

Copy link
Copy Markdown
Member

Hi! The buildbot wasm32-wasi 3.x has failed when building commit 2498c22.

@markshannon if you look at line 427 of https://buildbot.python.org/#/builders/1046/builds/7562/steps/8/logs/stdio you will see that test_super_deep nows stack overflows.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brettcannon brettcannon mentioned this pull request Feb 19, 2025
test_call triggers stack overflow on WASI #130319
Closed
@brettcannon

brettcannon commented Feb 19, 2025

Copy link
Copy Markdown
Member

I opened #130319 and assigned it to @markshannon .

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@freakboy3742

freakboy3742 commented Feb 20, 2025

Copy link
Copy Markdown
Contributor

This also appears to have caused a failure on the iOS buildbot (masked because there was an existing failure with the colorise tests). However, this build, triggered by the merge of this PR is the first one that has a failure in test_sys

======================================================================FAIL: test_getallocatedblocks (test.test_sys.SysModuleTest.test_getallocatedblocks)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/buildbot/Library/Developer/XCTestDevices/8A66533E-162E-4905-BE21-60D36FEECA7F/data/Containers/Bundle/Application/AB83D4DE-36DA-4FB0-ADE1-C02F896A0910/iOSTestbed.app/python/lib/python3.14/test/test_sys.py", line 1104, in test_getallocatedblocks
    self.assertLess(a, sys.gettotalrefcount())
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 592882 not less than 517807
----------------------------------------------------------------------
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@freakboy3742 freakboy3742 mentioned this pull request Feb 20, 2025
gh-130293: Ensure test__colorize will pass on dumb terminals. #130333
Merged
@freakboy3742

freakboy3742 commented Feb 20, 2025

Copy link
Copy Markdown
Contributor

@markshannon Looking into the iOS failure - the comment before the test that is failing says:

            # While we could imagine a Python session where the number of
            # multiple buffer objects would exceed the sharing of references,
            # it is unlikely to happen in a normal test run.

What constitutes "normal" here? Is it possible a sequential, single process run (i.e., how iOS runs the test suite) might trigger this? I'm a bit out my depth here on diagnosing the cause of this one, so any pointers or suggestions for possible causes would be most welcome.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@markshannon markshannon mentioned this pull request Feb 20, 2025
GH-91079: Fix stack overflow on AMD LTO linux #130369
Closed
@markshannon

markshannon commented Feb 20, 2025

Copy link
Copy Markdown
Member Author

sys.gettotalrefcount() is the total refcount per interpreter, but sys.getallocatedblocks() seems to be the total number of allocated blocks per process. If multiple interpreters were involved, I could see this test failing. Otherwise, it is puzzling.

This PR does no refcounting, allocation or deallocation.
My guess is that this PR is exposing an already existing miscounting of references when a recursion error occurs. Just a guess though.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@freakboy3742 freakboy3742 mentioned this pull request Feb 20, 2025
test_sys.SysModuleTest.get_allocated_blocks test precondition intermittently fails on iOS #130384
Closed
@freakboy3742

freakboy3742 commented Feb 20, 2025

Copy link
Copy Markdown
Contributor

@markshannon I've opened #130384 to track the problem. Annoyingly, I can't reproduce this locally - the test passes reliably on my own iOS test setup.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@freakboy3742 freakboy3742 mentioned this pull request Feb 20, 2025
gh-130384: Skip a test_getallocatedblocks test pre-condition on iOS. #130385
Merged
encukou added a commit to encukou/cpython that referenced this pull request Feb 21, 2025
@encukou
Revert "pythonGH-91079: Implement C stack limits using addresses, not…
fa3e02c
… counters. (pythonGH-130007)" for now

Unfortunatlely, the change broke some buildbots.

This reverts commit 2498c22.
encukou added a commit that referenced this pull request Feb 24, 2025
@encukou
GH-91079: Revert "GH-91079: Implement C stack limits using addresses,…
ef29104
… not counters. (GH-130007)" for now (GH130413)

Revert "GH-91079: Implement C stack limits using addresses, not counters. (GH-130007)" for now

Unfortunatlely, the change broke some buildbots.

This reverts commit 2498c22.
markshannon added a commit to faster-cpython/cpython that referenced this pull request Feb 24, 2025
@markshannon
Revert "pythonGH-91079: Revert "pythonGH-91079: Implement C stack lim…
d50ba27
…its using addresses, not counters. (pythonGH-130007)" for now (GH130413)"

This reverts commit ef29104.
@markshannon markshannon mentioned this pull request Feb 24, 2025
GH-130396: Use computed stack limits on linux #130398
Merged
@markshannon
markshannon deleted the c-recursion-limit branch February 25, 2025 09:23
@tpburns tpburns mentioned this pull request May 28, 2025
Python 3.15.0: test_sys.test_getallocatedblocks() fails if run after test_collections.test_odd_sizes() #134248
Closed
@cceneag

This comment was marked as spam.

Sign in to view
@skirpichev skirpichev mentioned this pull request Mar 30, 2026
Recursion error with hyp2f1 on s390x mpmath/mpmath#1046
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@encukou encukou encukou approved these changes
@rhettinger rhettinger Awaiting requested review from rhettinger rhettinger is a code owner
@Eclips4 Eclips4 Awaiting requested review from Eclips4 Eclips4 is a code owner
@isidentical isidentical Awaiting requested review from isidentical isidentical is a code owner
@JelleZijlstra JelleZijlstra Awaiting requested review from JelleZijlstra JelleZijlstra is a code owner
@pablogsal pablogsal Awaiting requested review from pablogsal pablogsal is a code owner
@lysnikolaou lysnikolaou Awaiting requested review from lysnikolaou lysnikolaou is a code owner
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner
@carljm carljm Awaiting requested review from carljm carljm is a code owner
@iritkatriel iritkatriel Awaiting requested review from iritkatriel iritkatriel is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Stack overflow collecting PGO data on Windows

Uh oh!

There was an error while loading. Please reload this page.

9 participants

@markshannon @zooba @encukou @bedevere-bot @brettcannon @freakboy3742 @cceneag @JelleZijlstra @iritkatriel
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.