detached 78cdc29

purego: don't split the stack on amd64 (#13)

It appears the Go runtime would occasionally decide to split the stack
while the callbackArgs struct was on the unmovable system stack and
so the pointer would then point to garbage memory. I did this right on
arm64
commit
78cdc2949de631829363ee8129ea4d990aea42aa
author
TotallyGamerJet · · 2022-07-29 02:41 UTC
committer
GitHub · · 2022-07-29 02:41 UTC
parent
1491ef7
signature
GPG Unverified4AEE18F83AFDEB23 The key is unknown
1 file · +4 -4
M sys_darwin_amd64.s +4 -4
@@ -75,10 +75,10 @@ TEXT syscall9X(SB), NOSPLIT, $0
7575 // runtime·cgocallback expects a call to the ABIInternal function
7676 // However, the tag <ABIInternal> is only available in the runtime :(
7777 // This is a small wrapper function that moves the parameter from AX to the stack
78-// where the Go function can find it. It then calls callbackWrap
79-TEXT callbackWrapInternal<>(SB), $0-0
80- MOVQ AX, 0(SP)
81- CALL ·callbackWrap(SB)
78+// where the Go function can find it. It then jumps to callbackWrap
79+TEXT callbackWrapInternal<>(SB), NOSPLIT, $0-0
80+ MOVQ AX, arg+8(SP)
81+ JMP ·callbackWrap(SB)
8282 RET
8383
8484 TEXT callbackasm1(SB), NOSPLIT, $0
@@ -75,10 +75,10 @@ TEXT syscall9X(SB), NOSPLIT, $0
75 // runtime·cgocallback expects a call to the ABIInternal function75 // runtime·cgocallback expects a call to the ABIInternal function
76 // However, the tag <ABIInternal> is only available in the runtime :(76 // However, the tag <ABIInternal> is only available in the runtime :(
77 // This is a small wrapper function that moves the parameter from AX to the stack77 // This is a small wrapper function that moves the parameter from AX to the stack
78-// where the Go function can find it. It then calls callbackWrap78+// where the Go function can find it. It then jumps to callbackWrap
79-TEXT callbackWrapInternal<>(SB), $0-079+TEXT callbackWrapInternal<>(SB), NOSPLIT, $0-0
80- MOVQ AX, 0(SP)80+ MOVQ AX, arg+8(SP)
81- CALL ·callbackWrap(SB)81+ JMP ·callbackWrap(SB)
82 RET82 RET
83 83
84 TEXT callbackasm1(SB), NOSPLIT, $084 TEXT callbackasm1(SB), NOSPLIT, $0

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close