Skip to content

gh-127604: Docs: Include a C stack in the faulthandler example #136081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 29, 2025

Conversation

ZeroIntensity
Copy link
Member

@ZeroIntensity ZeroIntensity commented Jun 28, 2025

@ZeroIntensity ZeroIntensity added docs Documentation in the Doc dir skip news needs backport to 3.14 bugs and security fixes labels Jun 28, 2025
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Jun 28, 2025
@ZeroIntensity ZeroIntensity changed the title gh-127604: Include a C stack in the faulthandler example gh-127604: Docs: Include a C stack in the faulthandler example Jun 28, 2025
@ZeroIntensity
Copy link
Member Author

@picnixz Are you around to do a quick review?

@picnixz
Copy link
Member

picnixz commented Jun 29, 2025

I'm around for 3h max and then I'm off for 10 days.

Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

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

Let's omit some lines even if it won't be omitted. If we change how string_at behaves or if the way calls are performed change, then it will need us to rewrite this example. Instead, I suggest to have some ... after _Py_DumpStack

@ZeroIntensity
Copy link
Member Author

I think it's ok to keep the addresses there for completeness, it's there as an example, not necessarily as a precise depiction of what happens if you call string_at(0). I was more worried about the line length or something like that.

@picnixz
Copy link
Member

picnixz commented Jun 29, 2025

May I suggest replacing /home/python/cpython/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-x86_64-linux-gnu.so by a home that is smaller, e.g., /opt/python/lib.linux-... ?

Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

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

I trust you about the different line numbers (hopefully it's coming from a real example).

@ZeroIntensity
Copy link
Member Author

Yeah, I just copy-pasted the output from a local run of ctypes.string_at(0).

@ZeroIntensity ZeroIntensity merged commit 3947847 into python:main Jun 29, 2025
29 checks passed
@miss-islington-app
Copy link

Thanks @ZeroIntensity for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Jun 29, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 29, 2025
pythonGH-136081)

(cherry picked from commit 3947847)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Jun 29, 2025

GH-136102 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Jun 29, 2025
@ZeroIntensity ZeroIntensity deleted the faulthandler-c-stack-docs branch June 29, 2025 14:58
ZeroIntensity added a commit that referenced this pull request Jun 29, 2025
…le (GH-136081) (GH-136102)

* gh-127604: Docs: Include a C stack in the `faulthandler` example (GH-136081)
(cherry picked from commit 3947847)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants