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

NetBSD's mod.rs: fix cpuid_t definition. #3386

Merged
merged 1 commit into from Oct 13, 2023
Merged

Commits on Oct 13, 2023

  1. NetBSD's mod.rs: fix cpuid_t definition.

    ...in particular for 32-bit CPUs / ports, such as 32-bit arm,
    i386, and powerpc.
    
    In the C header files on NetBSD, this is defined as
    
      typedef unsigned long   cpuid_t;
    
    and on ILP32 CPUs, that ends up being a 32-bit quantity.
    Defining this as a 64-bit type wrecks havoc on our 32-bit ports
    when e.g. _cpuset_isset() is used (as was introduced with 1.72.0),
    causing immediate SEGV due to NULL pointer de-reference, as observed
    in
    
      rust-lang/rust#116665
    
    So, instead, define it as ::c_ulong, and let the CPU-specific type
    definitions take care of the sizing.
    he32 committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    41755d1 View commit details
    Browse the repository at this point in the history