ROOTPLOIT
Server: LiteSpeed
System: Linux in-mum-web1878.main-hosting.eu 5.14.0-570.21.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 11 07:22:35 EDT 2025 x86_64
User: u435929562 (435929562)
PHP: 7.4.33
Disabled: system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/golang/1.22.0/src/cmd/go/testdata/script/build_issue48319.txt
# Regression test for https://go.dev/issue/48319:
# cgo builds should not include debug information from a stale GOROOT_FINAL.

[short] skip
[!cgo] skip

# This test is sensitive to cache invalidation,
# so use a separate build cache that we can control.
env GOCACHE=$WORK/gocache
mkdir $GOCACHE

# Build a binary using a specific value of GOROOT_FINAL.
env GOROOT_FINAL=$WORK${/}goroot1
go build -o main.exe
mv main.exe main1.exe

# Now clean the cache and build using a different GOROOT_FINAL.
# The resulting binaries should differ in their debug metadata.
go clean -cache
env GOROOT_FINAL=$WORK${/}goroot2
go build -o main.exe
mv main.exe main2.exe
! cmp -q main2.exe main1.exe

# Set GOROOT_FINAL back to the first value.
# If the build is properly reproducible, the two binaries should match.
env GOROOT_FINAL=$WORK${/}goroot1
go build -o main.exe
cmp -q main.exe main1.exe

-- go.mod --
module main

go 1.18
-- main.go --
package main

import "C"

import "runtime"

var _ C.int

func main() {
	println(runtime.GOROOT())
}