Skip to content

linux_like(android,linux): remove af_alg_iv unsound implementations in extra_traits feature - #5443

Open
dybucc wants to merge 1 commit into
rust-lang:libc-0.2from
dybucc:libc-0.2
Open

linux_like(android,linux): remove af_alg_iv unsound implementations in extra_traits feature#5443
dybucc wants to merge 1 commit into
rust-lang:libc-0.2from
dybucc:libc-0.2

Conversation

@dybucc

@dybucc dybucc commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Description

Closes #1501. See that issue for details on the
unsoundness report. That was fixed a while ago on main but the patch
would have broken stable, so a deprecation warning was applied instead.
Follows a brief discussion at
#1501 (comment).

Note the automatically-derived implementations for Debug and Clone
for this type seem odd now. The last member is a FAM upstream, so I
think Debug can just live with that, but Clone wouldn't feel right
to provide without some word of warning to users about the "extended"
length beyond the trailing struct member not being copied over to
the new instance of the type. I guess downstream users can then use a
newtype to implement Clone as they see fit; The fields on af_alg_iv
are public, after all.

Checklist

  • Relevant tests in libc-test/semver have been updated
  • Commit messages permalink to headers for added or changed API
  • Placeholder or unstable values like *LAST or *MAX have the
    standard doc comment
  • Tested locally (cargo test -p libc-test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@rustbot label +stable-nominated

Remove `extra_traits` implementations for `af_alg_iv` in stable to solve
the soundness issue reported at rust-lang#1501. This was already
deprecated on `main` in rust-lang#1703, and removed in
rust-lang/libc@0c9b044.

This patch ports those changes to the next stable release as it's been
quite some time since then.
@rustbot

rustbot commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in an Android module

cc @maurer

@rustbot rustbot added O-android O-linux O-linux-like O-unix S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Aug 28, 2026
@rustbot

rustbot commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Warning ⚠️

  • Pull requests are usually filed against the main branch for this repo, but this one is against libc-0.2. Please double check that you specified the right target!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-android O-linux O-linux-like O-unix S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants