code: 9ferno

Download patch

ref: 09d5252589c63389716b539efd10d75367bc6c83
parent: 7d3e91b76486084e6508401d27a9cb1401b83c65
author: 9ferno <gophone2015@gmail.com>
date: Mon Mar 14 01:52:09 EDT 2022

fixed bug in getcallerpc

--- a/emu/OpenBSD/asm-amd64.S
+++ b/emu/OpenBSD/asm-amd64.S
@@ -86,7 +86,7 @@
 	.type	getcallerpc,@function
 	.global	getcallerpc
 getcallerpc:
-	movq	8(%rbp), %rax
+	movq	8(%rdi), %rax /* rdi has the first argument to a function */
 	ret
 
 	.type	_tas,@function