Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic when executing specially-crafted file #129

Open
highwaycoder opened this issue Nov 1, 2023 · 0 comments
Open

Panic when executing specially-crafted file #129

highwaycoder opened this issue Nov 1, 2023 · 0 comments

Comments

@highwaycoder
Copy link

If you create a file called /bin/loop with the following contents:

#!/bin/loop

The VINIX kernel will infinitely recurse in the userland.start_program function, until it eventually runs out of stack space and panics.

The way Linux deals with this case is by keeping track of the recursion depth, and setting errno = ELOOP and returning if the arbitrary max depth is reached (I believe the depth is 4 on linux, but don't quote me on that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant