Code Monkey home page Code Monkey logo

Comments (5)

sunfishcode avatar sunfishcode commented on July 4, 2024

rustix has some alternate strategies for obtaining the auxv recoreds.

  • If you enable the "use-libc-auxv" feature (which is normally enabled by default), rustix calls the libc getauxval function instead of opening /proc/self/auxv. Because libc is also in control of program startup, libc implementations are able to read the auxv records from the stack instead of using /proc/self/auxv.
  • If you have Linux >= 6.4 and enable the "alloc" feature, rustix will use Linux's new PR_GET_AUXV feature instead of opening /proc/self/auxv.

I have tended to assume rustix's various default-features = false configurations aren't of interest and would be a distraction for most users, and that it's sufficient to document them in comments in the code rather than the README, but I'm open to ideas. Perhaps a new AdvancedOptions.md file would make sense?

from rustix.

sophie-h avatar sophie-h commented on July 4, 2024

Thanks!

which is normally enabled by default

I see! I will ask async-io if they disabled it intentionally. I guess that's the most likely pitfall for users of rustix then.

from rustix.

notgull avatar notgull commented on July 4, 2024

I've disabled this feature in async-io intentionally, as async-io does not require the libc auxiliary vector to function normally. I do not want to make async-io restrictive in this regard. Therefore the intended solution is to enable the libc auxv in the downstream consumer.

from rustix.

sunfishcode avatar sunfishcode commented on July 4, 2024

I expect this is fixed by #979, which makes rustix (a) try a little harder to use PR_GET_AUXV even when "alloc" isn't set, but also (b) fall back to int 0x80, so that it always at least works, even if it's slower. Most users still probably want "use-libc-auxv", which is carefully written to avoid pulling in the libc crate.

from rustix.

sunfishcode avatar sunfishcode commented on July 4, 2024

I believe this is fixed in #979, which is released in rustix 0.38.29. If there are any further issues, please reopen or file a new issue!

from rustix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.