]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo/internal/test: skip TestMultipleAssign when using UCRT on Windows
authorqmuntal <quimmuntal@gmail.com>
Fri, 19 Sep 2025 10:18:26 +0000 (12:18 +0200)
committerQuim Muntal <quimmuntal@gmail.com>
Mon, 22 Sep 2025 15:26:41 +0000 (08:26 -0700)
commit2353c1578596aae7128f028c75b52c6047f0b057
treeeb25345412ab4e3eb3a822f5098fd1132a62f88c
parent32dfd69282ac86b0ce49909d36e2a4e5797ad25c
cmd/cgo/internal/test: skip TestMultipleAssign when using UCRT on Windows

The Universal C Runtime (UCRT) default behavior is to crash the program
when strtol is called with an invalid base (that is, not 0 or 2..36).
This an invalid base (that is, not 0 or 2..36). This changes the test to
skip when running on Windows and linking with UCRT.

When using external linking mode this test passes if using the Mingw-w64
toolchain, even when linking with UCRT. That's because the Mingw-w64
linker adds a _set_invalid_parameter_handler call at startup that
overrides the default UCRT behavior. However, other toolchains, like
MSVC and LLVM, doesn't override the default behavior.

Overriding the default behavior is out of the scope for this test, so
the test is skipped instead.

Fixes #62887

Change-Id: I60f140faf0eda80a2de4e10876be25e0dbe442d2
Reviewed-on: https://go-review.googlesource.com/c/go/+/705455
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/cmd/cgo/internal/test/test.go
src/cmd/cgo/internal/test/test_unix.go
src/cmd/cgo/internal/test/test_windows.go