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

Path cleanups #1780

Merged
merged 1 commit into from
Dec 30, 2023
Merged

Path cleanups #1780

merged 1 commit into from
Dec 30, 2023

Conversation

ccoffing
Copy link
Contributor

Just a collection of path cleanups I have stumbled across. I have touch-tested the changes and they seem fine, except that screen won't exit (maybe it crashes) but it does that on master too.

So I think this is good as is, but screen could use some proofreading.

ELKS has no /usr/ucb/ so no need to search

Fix more PATH_MAX
@tyama501
Copy link
Contributor

Hi @ccoffing ,

I have been using "screen" on PC-98 and I can exit(kill?) it by Ctrl-a, k.
Can you exit by it?

Thank you.

@ccoffing
Copy link
Contributor Author

Hi @ccoffing ,

I have been using "screen" on PC-98 and I can exit(kill?) it by Ctrl-a, k. Can you exit by it?

Thank you.

Yes, Ctrl-a k causes screen to exit. However, that returns me to the login prompt, which seems strange (I would have expected to be returned to the shell which I had started screen from.)

But the problem I originally encountered was if I typed exit from the last shell in screen. I get no further output. The machine seems to hang at that point.

@ghaerr
Copy link
Owner

ghaerr commented Dec 30, 2023

Thanks @ccoffing.

However, that returns me to the login prompt, which seems strange (I would have expected to be returned to the shell which I had started screen from.)

But the problem I originally encountered was if I typed exit from the last shell in screen. I get no further output. The machine seems to hang at that point.

Both of these sound like possible stack or heap overflow. I notice that screen/Makefile already has -maout-heap=0x7000, perhaps that should be set to -maout-stack=8192 -maout-heap=0xffff to set 8K stack and max heap, to see if that changes anything. The screen source should be scrutinized to determine a max stack (default 4K) and minimum heap size.

I've been meaning to add a debug malloc (work in progress) to allow better runtime checking and reporting of these kinds of things...

@ghaerr ghaerr merged commit fbbad70 into ghaerr:master Dec 30, 2023
1 check passed
@ghaerr
Copy link
Owner

ghaerr commented Dec 30, 2023

/bin/sh is also tight on heap, although running screen shouldn't affect that issue. I sometimes login as toor and run from /bin/sash as an alternative for getting more input on these kinds of problems. In general, I believe both bash and sash to be pretty bug-free, so the stack overflow or memory overwrite is likely in screen.

@ccoffing ccoffing deleted the more-path-cleanups branch January 7, 2024 04:19
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

Successfully merging this pull request may close these issues.

3 participants