KEMBAR78
gh-133261: Use __builtin_frame_address() on GCC 9 and older by vstinner · Pull Request #133269 · python/cpython · GitHub
Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented May 1, 2025

GCC 9 and older don't have __has_builtin(), but have __builtin_frame_address() function.

GCC 9 and older don't have __has_builtin(), but have
__builtin_frame_address() function.
@vstinner
Copy link
Member Author

vstinner commented May 1, 2025

Without this change, test_frame crash randomly (ex: at the 3rd attempt).

With this change, test_frame no longer crash. I ran the test in a loop using ./python -m test test_frame -F and interrupted the test after 54 successful iterations.

@ambv
Copy link
Contributor

ambv commented May 1, 2025

Unsurprisingly, on Windows 11 with a different compiler and this PR applied, running -m test test_frame -F is still crashing with a stack overflow. That will need a different fix.

@vstinner vstinner merged commit d10bd81 into python:main May 1, 2025
45 checks passed
@vstinner vstinner deleted the builtin_frame_address branch May 1, 2025 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants