-
Notifications
You must be signed in to change notification settings - Fork 568
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#3544 RV64: Fix our memcpy return value error (#6873)
We optimized RV64 memfuncs in PR #6800. However, there was a mistake where the return value of memcpy was incorrectly set to ARG2 which led to segfaults in the release build. This PR addresses this issue. Additionally, our unit_tests did not catch this error because `ret = our_memcpy(&i, &j, sizeof(i));` was optimized by the compiler to `i = j; ret = &i;`. We resolved this by utilizing the `noinline` attribute.
- Loading branch information
Showing
2 changed files
with
24 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters