Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d50ba27
Revert "GH-91079: Revert "GH-91079: Implement C stack limits using ad…
markshannon Feb 24, 2025
3fa536f
Use pthread_getattr_np to determine stack limits on systems supportin…
markshannon Feb 21, 2025
6823fee
Add news
markshannon Feb 21, 2025
ad4eb6e
Use config option
markshannon Feb 21, 2025
93a681a
Manually update config
markshannon Feb 21, 2025
f6f68f6
Add some asserts and up limits
markshannon Feb 21, 2025
e23fdee
increase limits and use builtin functions to get stack pointer
markshannon Feb 21, 2025
881fded
Increase test limits even more
markshannon Feb 21, 2025
d112618
Make stack check handle sanitizers better
markshannon Feb 21, 2025
d215d21
Add stack protection to code gen
markshannon Feb 21, 2025
4fae07e
Fix test_compile
markshannon Feb 21, 2025
20298c6
Get a few more test passing on WASI
markshannon Feb 21, 2025
ba96443
Skip more WASI tests
markshannon Feb 21, 2025
b274143
Incorporate feedback from review and buildbots
markshannon Feb 22, 2025
e4a7a3d
Address review comments
markshannon Feb 22, 2025
7effdc5
Try to avoid C compiler optimizing out local address
markshannon Feb 24, 2025
28ea776
Fix typo
markshannon Feb 24, 2025
1d76b48
Only define helper if needed
markshannon Feb 24, 2025
415906c
Revert to estimated stack size for AIX
markshannon Feb 24, 2025
d13a059
Try moving call to GC
markshannon Feb 24, 2025
b3ccffc
Move gc.collect closer to count
markshannon Feb 24, 2025
a2c1656
Merge branch 'main' into gnu-stack-overflow-check
markshannon Feb 24, 2025
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
Next Next commit
Try moving call to GC
  • Loading branch information
markshannon committed Feb 24, 2025
commit d13a059c344d6e01d5b7f7de8ab9fb37221089c3
10 changes: 5 additions & 5 deletions Lib/test/test_sys.py
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,10 @@ def test_getallocatedblocks(self):
# about the underlying implementation: the function might
# return 0 or something greater.
self.assertGreaterEqual(a, 0)
gc.collect()
b = sys.getallocatedblocks()
self.assertLessEqual(b, a)
gc.collect()
try:
# While we could imagine a Python session where the number of
# multiple buffer objects would exceed the sharing of references,
Expand All @@ -1101,14 +1105,10 @@ def test_getallocatedblocks(self):
# references, this can cause the total number of allocated
# blocks to exceed the total number of references.
if not support.Py_GIL_DISABLED:
self.assertLess(a, sys.gettotalrefcount())
self.assertLess(b, sys.gettotalrefcount())
except AttributeError:
# gettotalrefcount() not available
pass
gc.collect()
b = sys.getallocatedblocks()
self.assertLessEqual(b, a)
gc.collect()
c = sys.getallocatedblocks()
self.assertIn(c, range(b - 50, b + 50))

Expand Down