rust-lang / rust-lang/libc

Android `prop_info` has changed size

Open
#2,844 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug E-easy E-help-wanted
Dominant language
Rust
Stars
2.6k
Forks
1.3k
Avg merge
1d 22h
Merged PRs (30d)
69

Description

libc defines prop_info for Android, as an opaque type but one whose size presumably matters (since libc fills in fields to match its size). However, Android appears to have changed the size of the private fields: name is now a 0-length array at the end.

This structure doesn't seem to ever be handled by value, only by pointer, so I don't think we need to specify its private fields at all.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Android libc binding for prop_info and checking its pointer-only uses. Inspect how the private fields and trailing name array are represented, then verify that the binding no longer encodes the changed size and run the relevant existing test suite.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, rust
Domain
operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.