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

runtime: callee saved r4 is destroyed unexpectedly in sigtramp@sys_darwin_arm.s #32744

beenshi opened this issue Jun 24, 2019 · 3 comments


Copy link

@beenshi beenshi commented Jun 24, 2019

TEXT runtime·sigtramp(SB),NOSPLIT,$0
	// Reserve space for callee-save registers and arguments.
	SUB	$36, R13

	MOVW	R4, 12(R13)
	MOVW	R5, 16(R13)
	MOVW	R6, 20(R13)
	MOVW	R7, 24(R13)
	MOVW	R8, 28(R13)
	MOVW	R11, 32(R13)	

	// Save arguments.
	MOVW	R0, 4(R13)	// sig
	MOVW	R1, 8(R13)	// info
	MOVW	R2, 12(R13)	// ctx

The R4 is first stored to 12(R13), then R2 is also stored to 12(R13), so the original value in R4 is destroyed.


This comment has been minimized.

Copy link

@gopherbot gopherbot commented Jun 24, 2019

Change mentions this issue: runtime: fix a register save/restore bug in sigtramp of arm-darwin


This comment has been minimized.

Copy link

@odeke-em odeke-em commented Jun 24, 2019

Thank you for reporting this bug @beenshi!

@ianlancetaylor I see you've reviewed Ben's CL, shall we triage this for Go1.13 or Go1.14?


This comment has been minimized.

Copy link

@ianlancetaylor ianlancetaylor commented Jun 24, 2019

It's fine for 1.13. Thanks.

@odeke-em odeke-em added this to the Go1.13 milestone Jun 24, 2019
@gopherbot gopherbot closed this in df901bc Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.