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

BUG: too small string size #113

Open
shentino opened this issue May 5, 2022 · 5 comments
Open

BUG: too small string size #113

shentino opened this issue May 5, 2022 · 5 comments

Comments

@shentino
Copy link
Collaborator

shentino commented May 5, 2022

May 4 17:15:55 ** error:String too long [caught]
error: /usr/System/sys/tool/vault
error: 732 - work
error: 202 - spawn_object_from_state
error:1115 /kernel/lib/auto read_file
May 4 17:15:55 ** Error spawning Bodies:UrMainbody
May 4 17:15:56 ** error:String too long [caught]
error: /usr/System/sys/tool/vault
error: 732 - work
error: 202 - spawn_object_from_state
error:1115 /kernel/lib/auto read_file
May 4 17:15:56 ** Error spawning Data:DB:mhelp
May 4 17:15:56 ** error:String too long [caught]
error: /usr/System/sys/tool/vault
error: 732 - work
error: 202 - spawn_object_from_state
error:1115 /kernel/lib/auto read_file

I'm almost certain this is due to failure to use a sufficiently large maximum string size in the DGD binary.

Suggested solution is a subroutine invoked by INITD->create() that will abort the startup process if certain configuration or status() values fail a sanity check.

I suggest checking max array size and max string size for starters.

I can come up with a patch for this myself if needed but atm the priority is to report the issue. I have higher priorities to deal with irl atm so for now a report will have to suffice until I can get more free time unless someone else wants to take care of this first.

@noahgibbs
Copy link
Collaborator

That all makes sense. Were you using a DGD that was built in non-SkotOS configuration (since SkotOS needs a bigger-than-default string size), or did mHelp and/or Mainbody wind up needing more space with something you had changed?

Your solution seems reasonable regardless, I'm just trying to figure out when the problem happens so I can prioritise it :-)

@shentino
Copy link
Collaborator Author

shentino commented May 5, 2022

I don't know, and my opinion 8s that 2hat matters more is when the setting can be detected

Imo tripping a sanity check early in the startup process is more productive than wasting effort on a bootup that a preventable error may well have contaminated

I'll come up with a patch, give me 48 hours

@shentino
Copy link
Collaborator Author

shentino commented May 5, 2022

If you want to beat me to it, either check the stderr during cold boot out of the box with 16 bit ssize or focus on INITD::create()

@noahgibbs
Copy link
Collaborator

I'm not likely to beat you to it this week.

@shentino
Copy link
Collaborator Author

shentino commented May 5, 2022

See PR 114

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

2 participants