Skip to content

Comments

Finish highjeans work#4989

Open
chengr4 wants to merge 8 commits intorust-lang:mainfrom
chengr4:finish-highjeans-work
Open

Finish highjeans work#4989
chengr4 wants to merge 8 commits intorust-lang:mainfrom
chengr4:finish-highjeans-work

Conversation

@chengr4
Copy link

@chengr4 chengr4 commented Feb 21, 2026

Description

This PR fixes #2903. This PR picks up the work started by @highjeans in #4336 which had stalled. I just followed up the comments from @tgross35 in the PR and tried to finish it.

Thanks for leaving a great start point to study this crate.

Sources

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@chengr4
Copy link
Author

chengr4 commented Feb 21, 2026

Hi @tgross35,

Could you help me understand why pub use new::*; and pub use crate::unix::*; in src/lib.rs conflict with each other, while other modules do not?

@highjeans
Copy link

highjeans commented Feb 21, 2026

Hi @chengr4, thanks for finishing this! I really wanted to do this myself but I got caught up in a bunch of work for my university so I ended up forgetting about this.

One thing to note, since now opaque_pthread_t is now just an empty enum, we dont need any of the new constants defined in apple/b32/mod.rs and apple/b64/mod.rs.

Also make sure to run the style checker in /ci/style.py before this is ready!

@chengr4 chengr4 force-pushed the finish-highjeans-work branch from 9fade92 to d79f324 Compare February 21, 2026 23:19
@rustbot rustbot added A-CI Area: CI-related items ctest Issues relating to the ctest crate labels Feb 21, 2026
@chengr4 chengr4 force-pushed the finish-highjeans-work branch from d79f324 to 37afe49 Compare February 21, 2026 23:26
@chengr4
Copy link
Author

chengr4 commented Feb 21, 2026

@highjeans Thank for answering; I totally forgot 🫠. Again, Thanks for leaving the PR for me to study this crate.

@tgross35

Actually, I failed cargo test --test ctest at my local.

bad `ELAST` value at byte 0: rust: 106 (0x6a) != c 107 (0x6b)
    rust bytes: 6a 00 00 00
    c bytes:    6b 00 00 00
bad `HOST_VM_INFO64_COUNT` value at byte 0: rust: 38 (0x26) != c 40 (0x28)
    rust bytes: 26 00 00 00
    c bytes:    28 00 00 00
bad `vm_statistics64_data_t` size: rust: 152 != c 160
bad `vm_statistics64` size: rust: 152 != c 160
size of `vm_statistics64_data_t` is 160 in C and 152 in Rust

size of `struct vm_statistics64` is 160 in C and 152 in Rust

Can you please guide me how to evaluate and fix this bug?

@chengr4 chengr4 marked this pull request as ready for review February 21, 2026 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: CI-related items ctest Issues relating to the ctest crate S-waiting-on-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect pthread_t definition on Darwin (should be a raw pointer, not an uintptr_t)

3 participants