Skip to content

regression: unsafe precondition(s) violated: slice::get_unchecked_mut requires that the index is within the slice #123285

Closed
@Mark-Simulacrum

Description

@Mark-Simulacrum
[INFO] [stderr] error: failed to run custom build command for `libsodium-sys v0.2.4 (https://github.com/Dhole/sodiumoxidez?branch=extra#53c0fb16)`
[INFO] [stderr] note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
[INFO] [stderr] 
[INFO] [stderr] Caused by:
[INFO] [stderr]   process didn't exit successfully: `/opt/rustwide/target/debug/build/libsodium-sys-06e88a69c64e58f8/build-script-build` (signal: 6, SIGABRT: process abort signal)
[INFO] [stderr]   --- stdout
[INFO] [stderr]   cargo:rerun-if-env-changed=SODIUM_LIB_DIR
[INFO] [stderr]   cargo:rerun-if-env-changed=SODIUM_SHARED
[INFO] [stderr]   cargo:rerun-if-env-changed=SODIUM_USE_PKG_CONFIG
[INFO] [stderr]   cargo:rerun-if-env-changed=SODIUM_DISABLE_PIE
[INFO] [stderr] 
[INFO] [stderr]   --- stderr
[INFO] [stderr]   thread 'main' panicked at library/core/src/panicking.rs:156:5:
[INFO] [stderr]   unsafe precondition(s) violated: slice::get_unchecked_mut requires that the index is within the slice
[INFO] [stderr]   stack backtrace:

reverse-deps of libsodium-sys 0.2.5, pnet_packet 0.26:

"unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed isize::MAX"

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-gubCategory: the reverse of a compiler bug is generally UBT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.T-opsemRelevant to the opsem teamregression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions