Giter Club home page Giter Club logo

Comments (2)

io12 avatar io12 commented on September 24, 2024

Thanks for putting in the effort to document the bug and make it easily reproducible! The issue was that GCC's recursion depth was too high and it overflowed the stack. The size of the stack that userland-execve created is 1MB. I increased it to 10MB (4acbe06), and that seems to fix it. It looks like normally, GCC tries to increase the stack size on its own with setrlimit() (gcc/toplev.cc) (libiberty/stack-limit.c), but I guess this only increases the size of the old stack.

Also, I'm curious what you're working on. It sounds interesting!

from userland-execve-rust.

kylewlacy avatar kylewlacy commented on September 24, 2024

Thank you for the fast fix! I tested out main and I'm able to confirm this fixed the segfault I was seeing!

As an aside, would it make sense to make the stack size configurable? I'd be willing to contribute a PR to make that change if so (although I don't personally need fine-grained control over the stack size... I imagine GCC is a bit of an outlier in terms of needing such a large stack).

Unfortunately, I'm not able to share any details openly yet, but I'm hopeful that will change soon! Userland exec specifically is a pretty interesting piece of the puzzle, so much so that I'd like to write a blog post about it one day.

from userland-execve-rust.

Related Issues (1)

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.