Skip to content
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

advise_writes_unsafely_to_part_of_map test fails on powerpc64le-unknown-linux-gnu #105

Closed
decathorpe opened this issue Dec 8, 2023 · 2 comments · Fixed by #106
Closed

Comments

@decathorpe
Copy link

I'm the maintainer of the package for this crate in Fedora Linux, and with the update to version 0.9.0, I noticed a new test failure on powerpc64le compared to v0.7.1:

---- test::advise_writes_unsafely_to_part_of_map stdout ----
thread 'test::advise_writes_unsafely_to_part_of_map' panicked at 'assertion failed: `(left == right)`
  left: `0`,
 right: `255`', src/lib.rs:1978:9

The error message points to this assertion:
https://github.com/RazrFalcon/memmap2-rs/blob/v0.9.0/src/lib.rs#L1978

I don't know how or why powerpc64le is different here exactly ... the only thing I can think of right now is that the default page size is 64KB on powerpc64le, while it's 4KB on most other architectures.

All tests pass on our other supported architectures ({x86_64,i686,aarch64,s390x}-unknown-linux-gnu).


Test environment:

  • Fedora Linux 40, 39, 38 / Red Hat Enterprise Linux 9
  • Rust 1.74 (Fedora) , Rust 1.71 (RHEL)
  • powerpc64le-unknown-linux-gnu (page size: 64K)
@adamreichold
Copy link

Yeah, that test assumes 4 kB page size. Will create a fix.

@decathorpe
Copy link
Author

Awesome, thank you for the quick fix!

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 a pull request may close this issue.

2 participants