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

rebis-dev 1.77 and Clippy #2831

Open
wants to merge 15 commits into
base: rebis-dev
Choose a base branch
from
Open

Conversation

bakaq
Copy link
Contributor

@bakaq bakaq commented Feb 19, 2025

This runs cargo fmt (to make CI happy) and fixes the Clippy warnings (so that we can benefit from its advice without noise).

The diff for cargo fmt is quite big, so it may be better if you do this locally. Manually fixing the warnings wasn't trivial though.

Notice that the test that failed here is also failing in the current rebis-dev, so nothing regressed.

@Skgland
Copy link
Contributor

Skgland commented Feb 20, 2025

Could you try cherry picking the commit from #2793 to fix CI?

@Skgland
Copy link
Contributor

Skgland commented Feb 20, 2025

Mh, macos has a segmentation fault, nightly and 1.77 fail to compile and the rest have the same single test failure.

Edit: Its is wasm job that fails to compile not the normal nightly build.

@bakaq
Copy link
Contributor Author

bakaq commented Feb 20, 2025

The single test failure is the one I mentioned in the OP. I've been able to get 1.77 to compile.

@adri326
Copy link
Contributor

adri326 commented Feb 21, 2025

The tests should start passing again with #2759

@bakaq bakaq force-pushed the rebis_fmt_clippy branch from 31a56fd to 940f2d1 Compare March 2, 2025 08:42
@bakaq bakaq force-pushed the rebis_fmt_clippy branch from 940f2d1 to 22e44d5 Compare March 2, 2025 08:43
@bakaq bakaq changed the title rebis-dev cargo fmt and Clippy rebis-dev 1.77 and Clippy Mar 2, 2025
@bakaq
Copy link
Contributor Author

bakaq commented Mar 2, 2025

As rebis-dev was already cargo fmted (thanks @mthom!), I'm switching this to solve just Clippy and 1.77.

The tests have become flaky for some reason. I have run them a few times and sometimes they pass, but sometimes a test case fails for some reason, and it's not always the same test case that fails when this happens! I will investigate to see if this is a problem in rebis-dev or if my manual Clippy fixes broke something for some reason.

@bakaq
Copy link
Contributor Author

bakaq commented Mar 2, 2025

Ok, the tests are indeed already flaky in rebis-dev. I think it may be because of UB in the unsafe code of the new Heap, because the panics and segfaults that are happening all seem to be happening in the heap. For example:

---- machine::lib_machine::tests::issue_2341 stdout ----
thread 'machine::lib_machine::tests::issue_2341' panicked at src/arena.rs:206:5:
value contains invalid bit pattern for field ArenaHeader.tag: InvalidBitPattern { invalid_bytes: 94 }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This looks like heap corruption caused by UB. It may be a good idea to write some tests for the new Heap and run them through Miri, because it will probably catch whatever UB is happening there if this is indeed the problem.

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.

4 participants