whatcanGOwrong

This commit is contained in:
2024-09-19 21:38:24 -04:00
commit d0ae4d841d
17908 changed files with 4096831 additions and 0 deletions
@@ -0,0 +1,18 @@
package main
import (
"fmt"
)
var g int = 0
func compromised()
func skipped() {
g++
}
func main() {
compromised()
fmt.Printf("%d\n", g)
}
@@ -0,0 +1,6 @@
#include "textflag.h"
TEXT ·compromised(SB),NOSPLIT,$0-0
BYTE $0x90 // The assembler strips NOP, this is a hardcoded NOP instruction
CALL main·skipped(SB)
RET