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

kernel: replace more C string manipulation by GAP string objects #4675

Open
fingolfin opened this issue Oct 19, 2021 · 0 comments · May be fixed by #5941
Open

kernel: replace more C string manipulation by GAP string objects #4675

fingolfin opened this issue Oct 19, 2021 · 0 comments · May be fixed by #5941
Labels
kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements topic: kernel

Comments

@fingolfin
Copy link
Member

Right now, the kernel still does quite a bit of mucking around with C strings, using strlcpy, strlcat, etc. -- a big part of that is for dealing with GAP roots, in src/sysroots.c. This cold could be made considerably easier (and safer) if it used GAP string and list objects for this.

However, we have a chicken-and-egg problem here: to use objects, the GAP memory manager needs to be initialized. But that requires us to have parsed command line arguments (CLAs). But the code parsing the CLAs in particular adds new sysroots...

To break this, I propose that we simply parse the CLAs twice: the first time around, we only look for options affecting the memory manager; then we set up the memory manager; and now parse the CLAs a second time, this time ignoring the complement of what was ignored before, i.e., only those for the memory manager.

@fingolfin fingolfin added kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements topic: kernel labels Oct 19, 2021
@fingolfin fingolfin linked a pull request Mar 6, 2025 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements topic: kernel
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant