Skip to content

Replace kernel/lib.c with musl-derived implementations#166

Merged
mato merged 1 commit intoSolo5:masterfrom
mato:replace-lib
Mar 9, 2017
Merged

Replace kernel/lib.c with musl-derived implementations#166
mato merged 1 commit intoSolo5:masterfrom
mato:replace-lib

Conversation

@mato
Copy link
Copy Markdown
Member

@mato mato commented Mar 9, 2017

This change replaces the functions defined in kernel/lib.c with
musl-derived implementations, which are then also used by the tests.

This change is motivated by an immediate need for known-good
implementations of these functions. I had not reviewed the original
implementations until running into major bugs in them today. Eventually
we want a better integration of "nolibc" into both kernel (Solo5) and
application (test) code, so this particular arrangement is temporary.

For simplicity the musl-derived implementations have been stripped down
to use the generic "fallback" implementations where possible.

This change replaces the functions defined in kernel/lib.c with
musl-derived implementations, which are then also used by the tests.

This change is motivated by an immediate need for known-good
implementations of these functions. I had not reviewed the original
implementations until running into major bugs in them today. Eventually
we want a better integration of "nolibc" into both kernel (Solo5) and
application (test) code, so this particular arrangement is temporary.

For simplicitly the musl-derived implementations have been stripped down
to use the generic "fallback" implementations where possible.
@mato
Copy link
Copy Markdown
Member Author

mato commented Mar 9, 2017

@djwillia @ricarkol The TL;DR of this PR is: "spot the bugs in strcmp()". This is the minimal change to just replace the implementations wholesale without having to think about it much so that I can get on with other things. #149 (or something like it) is still on the cards for both kernel and tests but that will take more time.

@mato
Copy link
Copy Markdown
Member Author

mato commented Mar 9, 2017

Merging this as the existing implementations need to be terminated with extreme prejudice.

@mato mato merged commit 6172099 into Solo5:master Mar 9, 2017
@mato mato deleted the replace-lib branch March 9, 2017 12:20
@hannesm
Copy link
Copy Markdown
Contributor

hannesm commented Mar 9, 2017

do you plan to do a solo5 release containing these changes? would be appreciated. I tested compilation on FreeBSD (CURRENT with clang-3.9, and 11 with clang-3.8) successfully.

@mato
Copy link
Copy Markdown
Member Author

mato commented Mar 9, 2017 via email

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.

2 participants