-
Notifications
You must be signed in to change notification settings - Fork 17.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
syscall, runtime/internal/syscall: zero r2 before mips linux syscalls
All mips variant perform syscalls similarly. R2 (v0) holds r1 and R3 (v1) holds r2 of a syscall. The latter is only used by 2-ret syscalls. A 1-ret syscall would not touch R3 but keeps it as is, making r2 be a random value. Always reset it to 0 before SYSCALL to fix the issue. Fixes #56426 Change-Id: Ie49965c0c3c224c4a895703ac659205cd040ff56 Reviewed-on: https://go-review.googlesource.com/c/go/+/452975 TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Meng Zhuo <[email protected]> Reviewed-by: Austin Clements <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Reviewed-by: Meng Zhuo <[email protected]>
- Loading branch information
1 parent
7a9ce74
commit 2c7c98c
Showing
4 changed files
with
7 additions
and
2 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
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