Skip to content

Patched Go 1.26.5 for Windows Server 2008 R2, Windows 7, Windows Server 2012, Windows Server 2012 R2 and Windows 8.1

Latest

Choose a tag to compare

@KobeArthurScofield KobeArthurScofield released this 08 Jul 04:28
c3c87ab

SECURITY NOTICE

Due to a known problem with RtlGenRandom (unexpected DLL loading behaviour, see Go issue , which has also affected PuTTY ), we have changed the substitution of ProcessPrng to BCryptGenRandom.

Patches are back-ported from the be-going-to Go 1.27 maintenance scraps, which has also unified several old patches. We have re-issued patches from Go 1.21 to Go 1.26.

If you are using Go 1.26, download this release or newer.

If you are still using older releases lower than 1.26, you should download source code from official Go, download the re-issued patch(es), and apply the patch(es) to make it into a usable source code package or bootstrap it into a compiled SDK. As the limitation of the current automation infrastructure, we may not re-release all the releases at the moment.

Contents

Upgrade to Go 1.26.5 with patch updates.

NOTICE

  • This SDK does not include support for Windows on 32-bit ARM.
  • This SDK does not include a patch for -race flag (Race Detector) for Windows 7 / Windows Server 2008 R2. This is a known issue which occurred since Go 1.21 and fixing this has side-effects on newer Windows.
  • This SDK does not include testing files anymore like official distributions.
  • The repository will drop support for Windows 7 (without KB3125574 or almost all updates released before April 2016) / Windows Server 2008 R2 (without KB3125574 or almost all updates released before April 2016) since Go 1.27. Only installing several key patches may also work, but compatibility may drift due to upstream changes.

Packages:

  • go-for-win7-{GOOS}-{GOARCH}.zip: Pre-compiled SDK binaries and source code including patches below:

    • Remove PEB hack for long path support (From Microsoft Go)
    • Fix dysfunctional of os.RemoveAll failing on legacy Windows
    • Use BCryptGenRandom as a compatible substitution of ProcessPrng
    • Fix removed console handle workaround for legacy Windows
  • source-legacy.zip: Source code targeting Windows 7 / Windows Server 2008 R2 that did not install updates released before April 2016 or without KB3125574 (May 2016, with Servicing Stack Update at least from KB3020369 (April 2015)) installed. This package can be manually compiled (bootstrapping) or copy-paste the src directory to a usable SDK. This package including patches below:

    • All patches from go-for-win7-{GOOS}-{GOARCH}.zip
    • Fix removed sysSocket fallback for legacy Windows
    • Fix LoadLibraryEx flag not supported on unpatched legacy systems

升级至 Go 1.26.5,并包含相关补丁更新。

注意事项

  • 本 SDK 不支持 32 位 ARM 架构的 Windows。
  • 本 SDK 不包含针对 Windows 7 / Windows Server 2008 R2 上 -race 参数(Race Detector,竞态检测器)的补丁。该问题自 Go 1.21 起已存在,目前修复会对较新版本的 Windows 产生副作用,因此不提供修复。
  • 本 SDK 不再包含与官方发行版类似的测试文件。
  • 仓库将从 Go 1.27 开始去除对未安装 KB3125574 或未安装大部分于 2016 年四月前发布的更新的 Windows 7 / Windows 2008 R2 的支持。 仅安装部分关键补丁仍有可能能正常运行,但受上游更改的影响其兼容性随时有可能发生漂变。

软件包说明

  • go-for-win7-{GOOS}-{GOARCH}.zip:预编译的 SDK 二进制文件及源代码,包含以下补丁:

    • 移除使用劫持进程环境块开启的长文件名支持(来自 Microsoft Go)
    • 修复 os.RemoveAll 在旧版本系统上行为异常的问题
    • 使用 BCryptGenRandom 替换 ProcessPrng
    • 修复因移除针对旧版 Windows 控制台的额外措施导致可能发生的控制台异常
  • source-legacy.zip:适用于未安装 2016 年 4 月前发布的更新未安装 KB3125574(2016 年 5 月,且至少需安装 KB3020369(2015 年 4 月)服务堆栈更新)的 Windows 7 / Windows Server 2008 R2 的源代码包。该软件包可用于手动编译(bootstrap 引导构建),或将其中的 src 目录复制到可用的 SDK 中使用。包含以下补丁:

    • 包含 go-for-win7-{GOOS}-{GOARCH}.zip 中的所有补丁
    • 修复未更新系统需要的 sysSocket 回退
    • 修复未更新系统不认识 LoadLibraryEx 所需的新标志的问题