Debian Codegraph @

doc/godebug.md

raw
1 ---
2 title: "Go, Backwards Compatibility, and GODEBUG"
3 layout: article
4 ---
5
6 <!--
7 This document is kept in the Go repo, not x/website,
8 because it documents the full list of known GODEBUG settings,
9 which are tied to a specific release.
10 -->
11
12 ## Introduction {#intro}
13
14 Go's emphasis on backwards compatibility is one of its key strengths.
15 There are, however, times when we cannot maintain complete compatibility.
16 If code depends on buggy (including insecure) behavior,
17 then fixing the bug will break that code.
18 New features can also have similar impacts:
19 enabling the HTTP/2 use by the HTTP client broke programs
20 connecting to servers with buggy HTTP/2 implementations.
21 These kinds of changes are unavoidable and
22 [permitted by the Go 1 compatibility rules](/doc/go1compat).
23 Even so, Go provides a mechanism called GODEBUG to
24 reduce the impact such changes have on Go developers
25 using newer toolchains to compile old code.
26
27 A GODEBUG setting is a `key=value` pair
28 that controls the execution of certain parts of a Go program.
29 The environment variable `GODEBUG`
30 can hold a comma-separated list of these settings.
31 For example, if a Go program is running in an environment that contains
32
33 GODEBUG=http2client=0,http2server=0
34
35 then that Go program will disable the use of HTTP/2 by default in both
36 the HTTP client and the HTTP server.
37 Unrecognized settings in the `GODEBUG` environment variable are ignored.
38 It is also possible to set the default `GODEBUG` for a given program
39 (discussed below).
40
41 When preparing any change that is permitted by Go 1 compatibility
42 but may nonetheless break some existing programs,
43 we first engineer the change to keep as many existing programs working as possible.
44 For the remaining programs,
45 we define a new GODEBUG setting that
46 allows individual programs to opt back in to the old behavior.
47 A GODEBUG setting may not be added if doing so is infeasible,
48 but that should be extremely rare.
49
50 GODEBUG settings added for compatibility will be maintained
51 for a minimum of two years (four Go releases).
52 Some, such as `http2client` and `http2server`,
53 will be maintained much longer, even indefinitely.
54
55 When possible, each GODEBUG setting has an associated
56 [runtime/metrics](/pkg/runtime/metrics/) counter
57 named `/godebug/non-default-behavior/<name>:events`
58 that counts the number of times a particular program's
59 behavior has changed based on a non-default value
60 for that setting.
61 For example, when `GODEBUG=http2client=0` is set,
62 `/godebug/non-default-behavior/http2client:events`
63 counts the number of HTTP transports that the program
64 has configured without HTTP/2 support.
65
66 ## Default GODEBUG Values {#default}
67
68 When a GODEBUG setting is not listed in the environment variable,
69 its value is derived from three sources:
70 the defaults for the Go toolchain used to build the program,
71 amended to match the Go version listed in `go.mod`,
72 and then overridden by explicit `//go:debug` lines in the program.
73
74 The [GODEBUG History](#history) gives the exact defaults for each Go toolchain version.
75 For example, Go 1.21 introduces the `panicnil` setting,
76 controlling whether `panic(nil)` is allowed;
77 it defaults to `panicnil=0`, making `panic(nil)` a run-time error.
78 Using `panicnil=1` restores the behavior of Go 1.20 and earlier.
79
80 When compiling a work module or workspace that declares
81 an older Go version, the Go toolchain amends its defaults
82 to match that older Go version as closely as possible.
83 For example, when a Go 1.21 toolchain compiles a program,
84 if the work module's `go.mod` or the workspace's `go.work`
85 says `go` `1.20`, then the program defaults to `panicnil=1`,
86 matching Go 1.20 instead of Go 1.21.
87
88 Because this method of setting GODEBUG defaults was introduced only in Go 1.21,
89 programs listing versions of Go earlier than Go 1.20 are configured to match Go 1.20,
90 not the older version.
91
92 To override these defaults, starting in Go 1.23, the work module's `go.mod`
93 or the workspace's `go.work` can list one or more `godebug` lines:
94
95 godebug (
96 default=go1.21
97 panicnil=1
98 asynctimerchan=0
99 )
100
101 The special key `default` indicates a Go version to take unspecified
102 settings from. This allows setting the GODEBUG defaults separately
103 from the Go language version in the module.
104 In this example, the program is asking for Go 1.21 semantics and
105 then asking for the old pre-Go 1.21 `panic(nil)` behavior and the
106 new Go 1.23 `asynctimerchan=0` behavior.
107
108 Only the work module's `go.mod` is consulted for `godebug` directives.
109 Any directives in required dependency modules are ignored.
110 It is an error to list a `godebug` with an unrecognized setting.
111 (Toolchains older than Go 1.23 reject all `godebug` lines, since they do not
112 understand `godebug` at all.) When a workspace is in use, `godebug`
113 directives in `go.mod` files are ignored, and `go.work` will be consulted
114 for `godebug` directives instead.
115
116 The defaults from the `go` and `godebug` lines apply to all main
117 packages that are built. For more fine-grained control,
118 starting in Go 1.21, a main package's source files
119 can include one or more `//go:debug` directives at the top of the file
120 (preceding the `package` statement).
121 The `godebug` lines in the previous example would be written:
122
123 //go:debug default=go1.21
124 //go:debug panicnil=1
125 //go:debug asynctimerchan=0
126
127 Starting in Go 1.21, the Go toolchain treats a `//go:debug` directive
128 with an unrecognized GODEBUG setting as an invalid program.
129 Programs with more than one `//go:debug` line for a given setting
130 are also treated as invalid.
131 (Older toolchains ignore `//go:debug` directives entirely.)
132
133 The defaults that will be compiled into a main package
134 are reported by the command:
135
136 go list -f '{{.DefaultGODEBUG}}' my/main/package
137
138 Only differences from the base Go toolchain defaults are reported.
139
140 When testing a package, `//go:debug` lines in the `*_test.go`
141 files are treated as directives for the test's main package.
142 In any other context, `//go:debug` lines are ignored by the toolchain;
143 `go` `vet` reports such lines as misplaced.
144
145 ## GODEBUG History {#history}
146
147 This section documents the GODEBUG settings introduced and removed in each major Go release
148 for compatibility reasons.
149 Packages or programs may define additional settings for internal debugging purposes;
150 for example,
151 see the [runtime documentation](/pkg/runtime#hdr-Environment_Variables)
152 and the [go command documentation](/cmd/go#hdr-Build_and_test_caching).
153
154 ### Go 1.26
155
156 Go 1.26.6 added a `fips140ems` setting that when set to `0` disables the
157 enforcement of Extended Master Secret in FIPS 140-3 mode. There is no change in
158 default behavior.
159
160 Go 1.26.1 added a new `htmlmetacontenturlescape` setting that controls whether
161 html/template will escape URLs in the `url=` portion of the content attribute of
162 HTML meta tags. The default `htmlmetacontentescape=1` will cause URLs to be
163 escaped. Setting `htmlmetacontentescape=0` disables this behavior.
164
165 Go 1.26 added a new `httpcookiemaxnum` setting that controls the maximum number
166 of cookies that net/http will accept when parsing HTTP headers. If the number of
167 cookie in a header exceeds the number set in `httpcookiemaxnum`, cookie parsing
168 will fail early. The default value is `httpcookiemaxnum=3000`. Setting
169 `httpcookiemaxnum=0` will allow the cookie parsing to accept an indefinite
170 number of cookies. To avoid denial of service attacks, this setting and default
171 was backported to Go 1.25.2 and Go 1.24.8.
172
173 Go 1.26 added a new `urlmaxqueryparams` setting that controls the maximum number
174 of query parameters that net/url will accept when parsing a URL-encoded query string.
175 If the number of parameters exceeds the number set in `urlmaxqueryparams`,
176 parsing will fail early. The default value is `urlmaxqueryparams=10000`.
177 Setting `urlmaxqueryparams=0` disables the limit. To avoid denial of service
178 attacks, this setting and default was backported to Go 1.25.6 and Go 1.24.12.
179
180 Go 1.26 added a new `urlstrictcolons` setting that controls whether `net/url.Parse`
181 allows malformed hostnames containing colons outside of a bracketed IPv6 address.
182 The default `urlstrictcolons=1` rejects URLs such as `http://localhost:1:2` or `http://::1/`.
183 Colons are permitted as part of a bracketed IPv6 address, such as `http://[::1]/`.
184
185 Go 1.26 enabled two additional post-quantum key exchange mechanisms:
186 SecP256r1MLKEM768 and SecP384r1MLKEM1024. The default can be reverted using the
187 [`tlssecpmlkem` setting](/pkg/crypto/tls/#Config.CurvePreferences).
188
189 Go 1.26 added a new `tracebacklabels` setting that controls the inclusion of
190 goroutine labels set through the the `runtime/pprof` package. Setting `tracebacklabels=1`
191 includes these key/value pairs in the goroutine status header of runtime
192 tracebacks and debug=2 runtime/pprof stack dumps. This format may change in the future.
193 (see go.dev/issue/76349)
194
195 Go 1.26 added a new `cryptocustomrand` setting that controls whether most crypto/...
196 APIs ignore the random `io.Reader` parameter. For Go 1.26, it defaults
197 to `cryptocustomrand=0`, ignoring the random parameters. Using `cryptocustomrand=1`
198 reverts to the pre-Go 1.26 behavior.
199
200 ### Go 1.25
201
202 Go 1.25 added a new `decoratemappings` setting that controls whether the Go
203 runtime annotates OS anonymous memory mappings with context about their
204 purpose. These annotations appear in /proc/self/maps and /proc/self/smaps as
205 "[anon: Go: ...]". This setting is only used on Linux. For Go 1.25, it defaults
206 to `decoratemappings=1`, enabling annotations. Using `decoratemappings=0`
207 reverts to the pre-Go 1.25 behavior. This setting is fixed at program startup
208 time, and can't be modified by changing the `GODEBUG` environment variable
209 after the program starts.
210
211 Go 1.25 added a new `embedfollowsymlinks` setting that controls whether the
212 Go command will follow symlinks to regular files embedding files.
213 The default value `embedfollowsymlinks=0` does not allow following
214 symlinks. `embedfollowsymlinks=1` will allow following symlinks.
215
216 Go 1.25 added a new `containermaxprocs` setting that controls whether the Go
217 runtime will consider cgroup CPU limits when setting the default GOMAXPROCS.
218 The default value `containermaxprocs=1` will use cgroup limits in addition to
219 the total logical CPU count and CPU affinity. `containermaxprocs=0` will
220 disable consideration of cgroup limits. This setting only affects Linux.
221
222 Go 1.25 added a new `updatemaxprocs` setting that controls whether the Go
223 runtime will periodically update GOMAXPROCS for new CPU affinity or cgroup
224 limits. The default value `updatemaxprocs=1` will enable periodic updates.
225 `updatemaxprocs=0` will disable periodic updates.
226
227 Go 1.25 disabled SHA-1 signature algorithms in TLS 1.2 according to RFC 9155.
228 The default can be reverted using the `tlssha1=1` setting.
229
230 Go 1.25 switched to SHA-256 to fill in missing SubjectKeyId in
231 crypto/x509.CreateCertificate. The setting `x509sha256skid=0` reverts to SHA-1.
232
233 Go 1.25 corrected the semantics of contention reports for runtime-internal locks,
234 and so removed the [`runtimecontentionstacks` setting](/pkg/runtime#hdr-Environment_Variables).
235
236 Go 1.25 (starting with Go 1.25 RC 2) disabled build information stamping when
237 multiple VCS are detected due to concerns around VCS injection attacks. This
238 behavior and setting was backported to Go 1.24.5 and Go 1.23.11. This behavior
239 can be renabled with the setting `allowmultiplevcs=1`.
240
241 ### Go 1.24
242
243 Go 1.24 added a new `fips140` setting that controls whether the Go
244 Cryptographic Module operates in FIPS 140-3 mode.
245 The possible values are:
246 - "off": no special support for FIPS 140-3 mode. This is the default.
247 - "on": the Go Cryptographic Module operates in FIPS 140-3 mode.
248 - "only": like "on", but cryptographic algorithms not approved by
249 FIPS 140-3 return an error or panic.
250 For more information, see [FIPS 140-3 Compliance](/doc/security/fips140).
251 This setting is fixed at program startup time, and can't be modified
252 by changing the `GODEBUG` environment variable after the program starts.
253
254 Go 1.24 changed the global [`math/rand.Seed`](/pkg/math/rand/#Seed) to be a
255 no-op. This behavior is controlled by the `randseednop` setting.
256 For Go 1.24 it defaults to `randseednop=1`.
257 Using `randseednop=0` reverts to the pre-Go 1.24 behavior.
258
259 Go 1.24 added new values for the `multipathtcp` setting.
260 The possible values for `multipathtcp` are now:
261 - "0": disable MPTCP on dialers and listeners by default
262 - "1": enable MPTCP on dialers and listeners by default
263 - "2": enable MPTCP on listeners only by default
264 - "3": enable MPTCP on dialers only by default
265
266 For Go 1.24, it now defaults to multipathtcp="2", thus
267 enabled by default on listeners. Using multipathtcp="0" reverts to the
268 pre-Go 1.24 behavior.
269
270 Go 1.24 changed the behavior of `go test -json` to emit build errors as JSON
271 instead of text.
272 These new JSON events are distinguished by new `Action` values,
273 but can still cause problems with CI systems that aren't robust to these events.
274 This behavior can be controlled with the `gotestjsonbuildtext` setting.
275 Using `gotestjsonbuildtext=1` restores the 1.23 behavior.
276 This setting will be removed in a future release, Go 1.28 at the earliest.
277
278 Go 1.24 changed [`crypto/rsa`](/pkg/crypto/rsa) to require RSA keys to be at
279 least 1024 bits. This behavior can be controlled with the `rsa1024min` setting.
280 Using `rsa1024min=0` restores the Go 1.23 behavior.
281
282 Go 1.24 introduced a mechanism for enabling platform specific Data Independent
283 Timing (DIT) modes in the [`crypto/subtle`](/pkg/crypto/subtle) package. This
284 mode can be enabled for an entire program with the `dataindependenttiming` setting.
285 For Go 1.24 it defaults to `dataindependenttiming=0`. There is no change in default
286 behavior from Go 1.23 when `dataindependenttiming` is unset.
287 Using `dataindependenttiming=1` enables the DIT mode for the entire Go program.
288 When enabled, DIT will be enabled when calling into C from Go. When enabled,
289 calling into Go code from C will enable DIT, and disable it before returning to
290 C if it was not enabled when Go code was entered.
291 This currently only affects arm64 programs. For all other platforms it is a no-op.
292
293 Go 1.24 removed the `x509sha1` setting. `crypto/x509` no longer supports verifying
294 signatures on certificates that use SHA-1 based signature algorithms.
295
296 Go 1.24 changes the default value of the [`x509usepolicies`
297 setting.](/pkg/crypto/x509/#CreateCertificate) from `0` to `1`. When marshalling
298 certificates, policies are now taken from the
299 [`Certificate.Policies`](/pkg/crypto/x509/#Certificate.Policies) field rather
300 than the
301 [`Certificate.PolicyIdentifiers`](/pkg/crypto/x509/#Certificate.PolicyIdentifiers)
302 field by default.
303
304 Go 1.24 enabled the post-quantum key exchange mechanism
305 X25519MLKEM768 by default. The default can be reverted using the
306 [`tlsmlkem` setting](/pkg/crypto/tls/#Config.CurvePreferences).
307 This can be useful when dealing with buggy TLS servers that do not handle large records correctly,
308 causing a timeout during the handshake (see [TLS post-quantum TL;DR fail](https://tldr.fail/)).
309 Go 1.24 also removed X25519Kyber768Draft00 and the Go 1.23 `tlskyber` setting.
310
311 Go 1.24 made [`ParsePKCS1PrivateKey`](/pkg/crypto/x509/#ParsePKCS1PrivateKey)
312 use and validate the CRT parameters in the encoded private key. This behavior
313 can be controlled with the `x509rsacrt` setting. Using `x509rsacrt=0` restores
314 the Go 1.23 behavior.
315
316 ### Go 1.23
317
318 Go 1.23 changed the channels created by package time to be unbuffered
319 (synchronous), which makes correct use of the [`Timer.Stop`](/pkg/time/#Timer.Stop)
320 and [`Timer.Reset`](/pkg/time/#Timer.Reset) method results much easier.
321 The [`asynctimerchan` setting](/pkg/time/#NewTimer) disables this change.
322 There are no runtime metrics for this change,
323 This setting will be removed in Go 1.27.
324
325 Go 1.23 changed the mode bits reported by [`os.Lstat`](/pkg/os#Lstat) and [`os.Stat`](/pkg/os#Stat)
326 for reparse points, which can be controlled with the `winsymlink` setting.
327 As of Go 1.23 (`winsymlink=1`), mount points no longer have [`os.ModeSymlink`](/pkg/os#ModeSymlink)
328 set, and reparse points that are not symlinks, Unix sockets, or dedup files now
329 always have [`os.ModeIrregular`](/pkg/os#ModeIrregular) set. As a result of these changes,
330 [`filepath.EvalSymlinks`](/pkg/path/filepath#EvalSymlinks) no longer evaluates
331 mount points, which was a source of many inconsistencies and bugs.
332 At previous versions (`winsymlink=0`), mount points are treated as symlinks,
333 and other reparse points with non-default [`os.ModeType`](/pkg/os#ModeType) bits
334 (such as [`os.ModeDir`](/pkg/os#ModeDir)) do not have the `ModeIrregular` bit set.
335
336 Go 1.23 changed [`os.Readlink`](/pkg/os#Readlink) and [`filepath.EvalSymlinks`](/pkg/path/filepath#EvalSymlinks)
337 to avoid trying to normalize volumes to drive letters, which was not always even possible.
338 This behavior is controlled by the `winreadlinkvolume` setting.
339 For Go 1.23, it defaults to `winreadlinkvolume=1`.
340 Previous versions default to `winreadlinkvolume=0`.
341
342 Go 1.23 enabled the experimental post-quantum key exchange mechanism
343 X25519Kyber768Draft00 by default. The default can be reverted using the
344 [`tlskyber` setting](/pkg/crypto/tls/#Config.CurvePreferences).
345 This can be useful when dealing with buggy TLS servers that do not handle large records correctly,
346 causing a timeout during the handshake (see [TLS post-quantum TL;DR fail](https://tldr.fail/)).
347
348 Go 1.23 changed the behavior of
349 [crypto/x509.ParseCertificate](/pkg/crypto/x509/#ParseCertificate) to reject
350 serial numbers that are negative. This change can be reverted with
351 the [`x509negativeserial` setting](/pkg/crypto/x509/#ParseCertificate).
352
353 Go 1.23 re-enabled support in html/template for ECMAScript 6 template literals by default.
354 The [`jstmpllitinterp` setting](/pkg/html/template#hdr-Security_Model) no longer has
355 any effect.
356
357 Go 1.23 changed the default TLS cipher suites used by clients and servers when
358 not explicitly configured, removing 3DES cipher suites. The default can be reverted
359 using the [`tls3des` setting](/pkg/crypto/tls/#Config.CipherSuites).
360 This setting will be removed in Go 1.27.
361
362 Go 1.23 changed the behavior of [`tls.X509KeyPair`](/pkg/crypto/tls#X509KeyPair)
363 and [`tls.LoadX509KeyPair`](/pkg/crypto/tls#LoadX509KeyPair) to populate the
364 Leaf field of the returned [`tls.Certificate`](/pkg/crypto/tls#Certificate).
365 This behavior is controlled by the `x509keypairleaf` setting. For Go 1.23, it
366 defaults to `x509keypairleaf=1`. Previous versions default to
367 `x509keypairleaf=0`.
368 This setting will be removed in Go 1.27.
369
370 Go 1.23 changed
371 [`net/http.ServeContent`](/pkg/net/http#ServeContent),
372 [`net/http.ServeFile`](/pkg/net/http#ServeFile), and
373 [`net/http.ServeFS`](/pkg/net/http#ServeFS) to
374 remove Cache-Control, Content-Encoding, Etag, and Last-Modified headers
375 when serving an error. This behavior is controlled by
376 the [`httpservecontentkeepheaders` setting](/pkg/net/http#ServeContent).
377 Using `httpservecontentkeepheaders=1` restores the pre-Go 1.23 behavior.
378
379 ### Go 1.22
380
381 Go 1.22 adds a configurable limit to control the maximum acceptable RSA key size
382 that can be used in TLS handshakes, controlled by the [`tlsmaxrsasize` setting](/pkg/crypto/tls#Conn.Handshake).
383 The default is tlsmaxrsasize=8192, limiting RSA to 8192-bit keys. To avoid
384 denial of service attacks, this setting and default was backported to Go
385 1.19.13, Go 1.20.8, and Go 1.21.1.
386
387 Go 1.22 made it an error for a request or response read by a net/http
388 client or server to have an empty Content-Length header.
389 This behavior is controlled by the `httplaxcontentlength` setting.
390
391 Go 1.22 changed the behavior of ServeMux to accept extended
392 patterns and unescape both patterns and request paths by segment.
393 This behavior can be controlled by the
394 [`httpmuxgo121` setting](/pkg/net/http/#ServeMux).
395
396 Go 1.22 added the [Alias type](/pkg/go/types#Alias) to [go/types](/pkg/go/types)
397 for the explicit representation of [type aliases](/ref/spec#Type_declarations).
398 Whether the type checker produces `Alias` types or not is controlled by the
399 [`gotypesalias` setting](/pkg/go/types#Alias).
400 For Go 1.22 it defaults to `gotypesalias=0`.
401 For Go 1.23, `gotypesalias=1` will become the default.
402 This setting will be removed in Go 1.27.
403
404 Go 1.22 changed the default minimum TLS version supported by both servers
405 and clients to TLS 1.2. The default can be reverted to TLS 1.0 using the
406 [`tls10server` setting](/pkg/crypto/tls/#Config).
407 This setting will be removed in Go 1.27.
408
409 Go 1.22 changed the default TLS cipher suites used by clients and servers when
410 not explicitly configured, removing the cipher suites which used RSA based key
411 exchange. The default can be reverted using the [`tlsrsakex` setting](/pkg/crypto/tls/#Config).
412 This setting will be removed in Go 1.27.
413
414 Go 1.22 disabled
415 [`ConnectionState.ExportKeyingMaterial`](/pkg/crypto/tls/#ConnectionState.ExportKeyingMaterial)
416 when the connection supports neither TLS 1.3 nor Extended Master Secret
417 (implemented in Go 1.21). It can be reenabled with the [`tlsunsafeekm`
418 setting](/pkg/crypto/tls/#ConnectionState.ExportKeyingMaterial).
419 This setting will be removed in Go 1.27.
420
421 Go 1.22 changed how the runtime interacts with transparent huge pages on Linux.
422 In particular, a common default Linux kernel configuration can result in
423 significant memory overheads, and Go 1.22 no longer works around this default.
424 To work around this issue without adjusting kernel settings, transparent huge
425 pages can be disabled for Go memory with the
426 [`disablethp` setting](/pkg/runtime#hdr-Environment_Variables).
427 This behavior was backported to Go 1.21.1, but the setting is only available
428 starting with Go 1.21.6.
429 This setting may be removed in a future release, and users impacted by this issue
430 should adjust their Linux configuration according to the recommendations in the
431 [GC guide](/doc/gc-guide#Linux_transparent_huge_pages), or switch to a Linux
432 distribution that disables transparent huge pages altogether.
433
434 Go 1.22 added contention on runtime-internal locks to the [`mutex`
435 profile](/pkg/runtime/pprof#Profile). Contention on these locks is always
436 reported at `runtime._LostContendedRuntimeLock`. Complete stack traces of
437 runtime locks can be enabled with the [`runtimecontentionstacks`
438 setting](/pkg/runtime#hdr-Environment_Variables). These stack traces have
439 non-standard semantics, see setting documentation for details.
440
441 Go 1.22 added a new [`crypto/x509.Certificate`](/pkg/crypto/x509/#Certificate)
442 field, [`Policies`](/pkg/crypto/x509/#Certificate.Policies), which supports
443 certificate policy OIDs with components larger than 31 bits. By default this
444 field is only used during parsing, when it is populated with policy OIDs, but
445 not used during marshaling. It can be used to marshal these larger OIDs, instead
446 of the existing PolicyIdentifiers field, by using the
447 [`x509usepolicies` setting](/pkg/crypto/x509/#CreateCertificate).
448
449
450 ### Go 1.21
451
452 Go 1.21 made it a run-time error to call `panic` with a nil interface value,
453 controlled by the [`panicnil` setting](/pkg/builtin/#panic).
454
455 Go 1.21 made it an error for html/template actions to appear inside of an ECMAScript 6
456 template literal, controlled by the
457 [`jstmpllitinterp` setting](/pkg/html/template#hdr-Security_Model).
458 This behavior was backported to Go 1.19.8+ and Go 1.20.3+.
459
460 Go 1.21 introduced a limit on the maximum number of MIME headers and multipart
461 forms, controlled by the
462 [`multipartmaxheaders` and `multipartmaxparts` settings](/pkg/mime/multipart#hdr-Limits)
463 respectively.
464 This behavior was backported to Go 1.19.8+ and Go 1.20.3+.
465
466 Go 1.21 adds the support of Multipath TCP but it is only used if the application
467 explicitly asked for it. This behavior can be controlled by the
468 [`multipathtcp` setting](/pkg/net#Dialer.SetMultipathTCP).
469
470 There is no plan to remove any of these settings.
471
472 ### Go 1.20
473
474 Go 1.20 introduced support for rejecting insecure paths in tar and zip archives,
475 controlled by the [`tarinsecurepath` setting](/pkg/archive/tar/#Reader.Next)
476 and the [`zipinsecurepath` setting](/pkg/archive/zip/#NewReader).
477 These default to `tarinsecurepath=1` and `zipinsecurepath=1`,
478 preserving the behavior of earlier versions of Go.
479 A future version of Go may change the defaults to
480 `tarinsecurepath=0` and `zipinsecurepath=0`.
481
482 Go 1.20 introduced automatic seeding of the
483 [`math/rand`](/pkg/math/rand) global random number generator,
484 controlled by the [`randautoseed` setting](/pkg/math/rand/#Seed).
485
486 Go 1.20 introduced the concept of fallback roots for use during certificate verification,
487 controlled by the [`x509usefallbackroots` setting](/pkg/crypto/x509/#SetFallbackRoots).
488
489 Go 1.20 removed the preinstalled `.a` files for the standard library
490 from the Go distribution.
491 Installations now build and cache the standard library like
492 packages in other modules.
493 The [`installgoroot` setting](/cmd/go#hdr-Compile_and_install_packages_and_dependencies)
494 restores the installation and use of preinstalled `.a` files.
495
496 There is no plan to remove any of these settings.
497
498 ### Go 1.19
499
500 Go 1.19 made it an error for path lookups to resolve to binaries in the current directory,
501 controlled by the [`execerrdot` setting](/pkg/os/exec#hdr-Executables_in_the_current_directory).
502 There is no plan to remove this setting.
503
504 Go 1.19 started sending EDNS0 additional headers on DNS requests.
505 This can reportedly break the DNS server provided on some routers,
506 such as CenturyLink Zyxel C3000Z.
507 This can be changed by the [`netedns0` setting](/pkg/net#hdr-Name_Resolution).
508 This setting is available in Go 1.21.12, Go 1.22.5, Go 1.23, and later.
509 There is no plan to remove this setting.
510
511 ### Go 1.18
512
513 Go 1.18 removed support for SHA1 in most X.509 certificates,
514 controlled by the [`x509sha1` setting](/pkg/crypto/x509#InsecureAlgorithmError).
515 This setting was removed in Go 1.24.
516
517 ### Go 1.10
518
519 Go 1.10 changed how build caching worked and added test caching, along
520 with the [`gocacheverify`, `gocachehash`, and `gocachetest` settings](/cmd/go/#hdr-Build_and_test_caching).
521 There is no plan to remove these settings.
522
523 ### Go 1.6
524
525 Go 1.6 introduced transparent support for HTTP/2,
526 controlled by the [`http2client`, `http2server`, and `http2debug` settings](/pkg/net/http/#hdr-HTTP_2).
527 There is no plan to remove these settings.
528
529 ### Go 1.5
530
531 Go 1.5 introduced a pure Go DNS resolver,
532 controlled by the [`netdns` setting](/pkg/net/#hdr-Name_Resolution).
533 There is no plan to remove this setting.