Skip to content

ffi::cpython::unicodeobject::tests::{ascii,ucs4} unit tests segfault on s390x #1824

Closed
@decathorpe

Description

@decathorpe

Building pyo3 0.14.3 on s390x on Fedora Rawhide, the following two unit tests crash:

  • ffi::cpython::unicodeobject::tests::ascii
  • ffi::cpython::unicodeobject::tests::ucs4

Because they crash the test runner process, there's no output from those tests, except that they fail.

There are similar issues in the cpython crate:
dgrunwald/rust-cpython#265

Looks like PyUnicode_KIND is a bitfield that is different depending on system endianness (s390x is the only big-endian architecture I have access to).

🌍 Environment

  • Your operating system and version: Fedora Rawhide / 36
  • Your python version: 3.10.0-rc1
  • How did you install python (e.g. apt or pyenv)? Did you use a virtualenv?: default system /usr/bin/python3
  • Your Rust version (rustc --version): 1.54.0 stable on s390x-unknown-linux-gnu
  • Your PyO3 version: 0.14.3
  • Have you tried using latest PyO3 main (replace version = "0.x.y" with git = "https://github.com/PyO3/pyo3")?: no

💥 Reproducing

Running cargo test --release on a s390x machine causes this issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions