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

memcpy should use our implementation #46

Closed
tari opened this issue Jul 26, 2020 · 1 comment
Closed

memcpy should use our implementation #46

tari opened this issue Jul 26, 2020 · 1 comment

Comments

@tari
Copy link
Collaborator

tari commented Jul 26, 2020

GCC can often inline memcpy, but we also currently rename it to sys_memcpy to avoid potential recursive invocation (wherein it optimizes the implementation to a call to memcpy). The syscall seems to sometimes behave incorrectly; we should provide a version of memcpy built with appropriate options to avoid recursing.

GCC manual suggests building that particular module with -ffreestanding and implementing memcpy, memmove, memset and memcmp should be good.

@tari
Copy link
Collaborator Author

tari commented Jul 29, 2020

Fixed by d1d30ce.

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