Comments (2)
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from userland-execve-rust.