Skip to content

gh-151040: Fix test_c_stack_unwind on riscv64#152370

Open
ByteFlowing1337 wants to merge 1 commit into
python:mainfrom
ByteFlowing1337:fix-151040
Open

gh-151040: Fix test_c_stack_unwind on riscv64#152370
ByteFlowing1337 wants to merge 1 commit into
python:mainfrom
ByteFlowing1337:fix-151040

Conversation

@ByteFlowing1337

@ByteFlowing1337 ByteFlowing1337 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

According to https://riscv-non-isa.github.io/riscv-elf-psabi-doc/#_frame_pointer_convention, riscv64 puts the return address at fp[-1], and the previous frame pointer at fp[-2].

I verified this fix by using GCC to build CPython, and successfully ran ./python -m test -v test_c_stack_unwind via Docker and QEMU (docker run --platform linux/riscv64 riscv64/ubuntu:24.04). Tests passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant