[DO NOT MERGE] testing Windows CI failures

This commit is contained in:
Ayke van Laethem
2024-11-08 11:20:51 +01:00
parent e12da15f7d
commit 2dd06c4378
9 changed files with 133 additions and 40 deletions
+2
View File
@@ -93,6 +93,8 @@ func main(argc int32, argv *unsafe.Pointer) int {
stackTop = getCurrentStackPointer()
runMain()
sleepTicks(nanosecondsToTicks(1e9))
// For libc compatibility.
return 0
}
+10 -2
View File
@@ -52,7 +52,13 @@ func mainCRTStartup() int {
stackTop = getCurrentStackPointer()
runMain()
// For libc compatibility.
// Exit via exit(0) instead of returning.
// This matches mingw-w64-crt/crt/crtexe.c, which exits using exit(0)
// instead of returning the return value.
libc_exit(0)
// Unreachable, since we're already exited. But we need to return something
// to make this valid Go code.
return 0
}
@@ -92,7 +98,9 @@ func os_runtime_args() []string {
}
func putchar(c byte) {
libc_putchar(int(c))
if libc_putchar(int(c)) < 0 {
libc_exit(42)
}
}
var heapSize uintptr = 128 * 1024 // small amount to start