Skip to content

Fix build failure on non-arm 32bit architectures #264

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

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

helmutg
Copy link

@helmutg helmutg commented May 14, 2025

An incompatible format triggers -Werror=format-security. %zu is widely available and is the correct type for size_t. The correct format string to be used for uintptr_t is defined in inttypes.h.

When casting from a pointer to an integer, we trip up -Werror=pointer-to-int-cast unless the target integer type has exactly the same size as a pointer.

@P403n1x87
Copy link
Owner

P403n1x87 commented May 14, 2025

@helmutg thanks for looking into this. Does this fix need to go into the master branch, or can it go in devel? I understand this is likely needed to build Debian packages. If this has to go on master, I think there are a few commits that might have to be cherry-picked from devel first, to at the very least fix the current state of CI.

For context: the master branch is generally at the state of the last release, whereas all active development happens on the devel branch.

@helmutg helmutg changed the base branch from master to devel May 14, 2025 20:25
@helmutg
Copy link
Author

helmutg commented May 14, 2025

The Debian package will include the original commit as it would fail to build otherwise. See https://salsa.debian.org/python-team/packages/austin. I've rebased it on devel.

@P403n1x87
Copy link
Owner

All the Linux tests are failing. From the logs I can see

Cannot get memory maps for pid 3450

which makes me think that this might be related to the changes around the /proc/maps parsing 🤔

An incompatible format triggers -Werror=format-security. %zu is widely
available and is the correct type for size_t. The correct format string
to be used for uintptr_t is defined in inttypes.h.

When casting from a pointer to an integer, we trip up
-Werror=pointer-to-int-cast unless the target integer type has exactly
the same size as a pointer.
@helmutg
Copy link
Author

helmutg commented May 15, 2025

Thanks for pointing at the root cause. I introduced the problem in my rebase onto devel where I messed up converted ADDR_FMT to %zd when it should have been %zx in two occasions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants