Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(326)

Delta Between Two Patch Sets: doc/go1.3.html

Issue 91590044: code review 91590044: doc/go1.3.html: mention cgo [0]byte bug fix fallout (Closed)
Left Patch Set: diff -r 29348a1c6914 https://code.google.com/p/go/ Created 9 years, 10 months ago
Right Patch Set: diff -r 29348a1c6914 https://code.google.com/p/go/ Created 9 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 <!--{ 1 <!--{
2 "Title": "Go 1.3 Release Notes", 2 "Title": "Go 1.3 Release Notes",
3 "Path": "/doc/go1.3", 3 "Path": "/doc/go1.3",
4 "Template": true 4 "Template": true
5 }--> 5 }-->
6 6
7 <h2 id="introduction">Introduction to Go 1.3</h2> 7 <h2 id="introduction">Introduction to Go 1.3</h2>
8 8
9 <p> 9 <p>
10 The latest Go release, version 1.3, arrives six months after 1.2, 10 The latest Go release, version 1.3, arrives six months after 1.2,
(...skipping 18 matching lines...) Expand all
29 <p> 29 <p>
30 Microsoft stopped supporting Windows 2000 in 2010. 30 Microsoft stopped supporting Windows 2000 in 2010.
31 Since it has <a href="https://codereview.appspot.com/74790043">implementation di fficulties</a> 31 Since it has <a href="https://codereview.appspot.com/74790043">implementation di fficulties</a>
32 regarding exception handling (signals in Unix terminology), 32 regarding exception handling (signals in Unix terminology),
33 as of Go 1.3 it is not supported by Go either. 33 as of Go 1.3 it is not supported by Go either.
34 </p> 34 </p>
35 35
36 <h3 id="dragonfly">Support for DragonFly BSD</h3> 36 <h3 id="dragonfly">Support for DragonFly BSD</h3>
37 37
38 <p> 38 <p>
39 Go 1.3 now includes experimental support for DragonFly BSD on the <code>amd64</c ode> (64-bit x86) and <code>386</code> (32-bit x86) architectures. It uses Drago nFly BSD 3.6 or above. 39 Go 1.3 now includes experimental support for DragonFly BSD on the <code>amd64</c ode> (64-bit x86) and <code>386</code> (32-bit x86) architectures.
40 It uses DragonFly BSD 3.6 or above.
40 </p> 41 </p>
41 42
42 <h3 id="freebsd">Support for FreeBSD</h3> 43 <h3 id="freebsd">Support for FreeBSD</h3>
43 44
44 <p> 45 <p>
45 It was not announced at the time, but since the release of Go 1.2, support for G o on FreeBSD 46 It was not announced at the time, but since the release of Go 1.2, support for G o on FreeBSD
46 requires FreeBSD 8 or above. 47 requires FreeBSD 8 or above.
47 </p> 48 </p>
48 49
49 <p> 50 <p>
50 As of Go 1.3, support for Go on FreeBSD requires that the kernel be compiled wit h the 51 As of Go 1.3, support for Go on FreeBSD requires that the kernel be compiled wit h the
51 <code>COMPAT_FREEBSD32</code> flag configured. 52 <code>COMPAT_FREEBSD32</code> flag configured.
52 </p> 53 </p>
53 54
54 <p> 55 <p>
55 In concert with the switch to EABI syscalls for ARM platforms, Go 1.3 will run o nly on 56 In concert with the switch to EABI syscalls for ARM platforms, Go 1.3 will run o nly on FreeBSD 10.
56 FreeBSD 10. The x86 platforms, 386 and amd64, are unaffected. 57 The x86 platforms, 386 and amd64, are unaffected.
57 </p> 58 </p>
58 59
59 <h3 id="nacl">Support for Native Client</h3> 60 <h3 id="nacl">Support for Native Client</h3>
60 61
61 <p> 62 <p>
62 Support for the Native Client virtual machine architecture has returned to Go wi th the 1.3 release. 63 Support for the Native Client virtual machine architecture has returned to Go wi th the 1.3 release.
63 It runs on the 32-bit Intel architectures (<code>GOARCH=386</code>) and also on 64-bit Intel, but using 64 It runs on the 32-bit Intel architectures (<code>GOARCH=386</code>) and also on 64-bit Intel, but using
64 32-bit pointers (<code>GOARCH=amd64p32</code>). 65 32-bit pointers (<code>GOARCH=amd64p32</code>).
65 There is not yet support for Native Client on ARM. 66 There is not yet support for Native Client on ARM.
66 Note that this is Native Client (NaCl), not Portable Native Client (PNaCl). 67 Note that this is Native Client (NaCl), not Portable Native Client (PNaCl).
67 Details about Native Client are <a href="https://developers.google.com/native-cl ient/dev/">here</a>; 68 Details about Native Client are <a href="https://developers.google.com/native-cl ient/dev/">here</a>;
68 how to set up the Go version is described <a href="http://golang.org/wiki/Native Client">here</a>. 69 how to set up the Go version is described <a href="http://golang.org/wiki/Native Client">here</a>.
69 </p> 70 </p>
70 71
71 <h3 id="netbsd">Support for NetBSD</h3> 72 <h3 id="netbsd">Support for NetBSD</h3>
72 73
73 <p> 74 <p>
74 As of Go 1.3, support for Go on NetBSD requires NetBSD 6.0 or above. 75 As of Go 1.3, support for Go on NetBSD requires NetBSD 6.0 or above.
75 </p> 76 </p>
76 77
77 <h3 id="openbsd">Support for OpenBSD</h3> 78 <h3 id="openbsd">Support for OpenBSD</h3>
78 79
79 <p> 80 <p>
80 As of Go 1.3, support for Go on OpenBSD requires OpenBSD 5.5 or above. 81 As of Go 1.3, support for Go on OpenBSD requires OpenBSD 5.5 or above.
81 </p> 82 </p>
82 83
83 <h3 id="plan9">Support for Plan 9</h3> 84 <h3 id="plan9">Support for Plan 9</h3>
84 85
85 <p> 86 <p>
86 Go 1.3 now includes experimental support for Plan 9 on the <code>386</code> (32- bit x86) architecture. It requires the <code>Tsemacquire</code> syscall, which h as been in Plan 9 since June, 2012. 87 Go 1.3 now includes experimental support for Plan 9 on the <code>386</code> (32- bit x86) architecture.
88 It requires the <code>Tsemacquire</code> syscall, which has been in Plan 9 since June, 2012.
87 </p> 89 </p>
88 90
89 <h3 id="solaris">Support for Solaris</h3> 91 <h3 id="solaris">Support for Solaris</h3>
90 92
91 <p> 93 <p>
92 Go 1.3 now includes experimental support for Solaris on the <code>amd64</code> ( 64-bit x86) architecture. It requires illumos, Solaris 11 or above. 94 Go 1.3 now includes experimental support for Solaris on the <code>amd64</code> ( 64-bit x86) architecture.
95 It requires illumos, Solaris 11 or above.
93 </p> 96 </p>
94 97
95 <h2 id="memory">Changes to the memory model</h2> 98 <h2 id="memory">Changes to the memory model</h2>
96 99
97 <p> 100 <p>
98 The Go 1.3 memory model <a href="https://codereview.appspot.com/75130045">adds a new rule</a> 101 The Go 1.3 memory model <a href="https://codereview.appspot.com/75130045">adds a new rule</a>
99 concerning sending and receiving on buffered channels, 102 concerning sending and receiving on buffered channels,
100 to make explicit that a buffered channel can be used as a simple 103 to make explicit that a buffered channel can be used as a simple
101 semaphore, using a send into the 104 semaphore, using a send into the
102 channel to acquire and a receive from the channel to release. 105 channel to acquire and a receive from the channel to release.
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 </p> 224 </p>
222 225
223 <p> 226 <p>
224 The <a href="/cmd/go/"><code>go build</code></a> subcommand 227 The <a href="/cmd/go/"><code>go build</code></a> subcommand
225 supports a new <code>-i</code> option to install dependencies 228 supports a new <code>-i</code> option to install dependencies
226 of the specified target, but not the target itself. 229 of the specified target, but not the target itself.
227 </p> 230 </p>
228 231
229 <p> 232 <p>
230 Cross compiling with <a href="/cmd/cgo/"><code>cgo</code></a> enabled 233 Cross compiling with <a href="/cmd/cgo/"><code>cgo</code></a> enabled
231 is now supported. The CC_FOR_TARGET and CXX_FOR_TARGET environment 234 is now supported.
235 The CC_FOR_TARGET and CXX_FOR_TARGET environment
232 variables are used when running all.bash to specify the cross compilers 236 variables are used when running all.bash to specify the cross compilers
233 for C and C++ code, respectively. 237 for C and C++ code, respectively.
234 </p> 238 </p>
235 239
236 <p> 240 <p>
237 Finally, the go command now supports packages that import Objective-C 241 Finally, the go command now supports packages that import Objective-C
238 files (suffixed <code>.m</code>) through cgo. 242 files (suffixed <code>.m</code>) through cgo.
239 </p> 243 </p>
240 244
241 <h3 id="cgo">Changes to cgo</h3> 245 <h3 id="cgo">Changes to cgo</h3>
242 246
243 <p> 247 <p>
244 The <a href="/cmd/cgo/"><code>cmd/cgo</code></a> command, 248 The <a href="/cmd/cgo/"><code>cmd/cgo</code></a> command,
245 which processes <code>import "C"</code> declarations in Go packages, 249 which processes <code>import "C"</code> declarations in Go packages,
246 has corrected a serious bug that may cause some packages to stop compiling. 250 has corrected a serious bug that may cause some packages to stop compiling.
247 Previously, all pointers to incomplete struct types translated to the Go type <c ode>*[0]byte</code>, 251 Previously, all pointers to incomplete struct types translated to the Go type <c ode>*[0]byte</code>,
248 with the effect that the Go compiler could not diagnose passing one kind of stru ct pointer 252 with the effect that the Go compiler could not diagnose passing one kind of stru ct pointer
249 to a function expecting another. Go 1.3 corrects this mistake by translating eac h different 253 to a function expecting another.
254 Go 1.3 corrects this mistake by translating each different
250 incomplete struct to a different named type. 255 incomplete struct to a different named type.
251 However, some Go code took advantage of this bug to pass (for example) a <code>* C.FILE</code> 256 However, some Go code took advantage of this bug to pass (for example) a <code>* C.FILE</code>
252 from one package to another. This is not legal and no longer works: in general G o packages 257 from one package to another.
258 This is not legal and no longer works: in general Go packages
253 should avoid exposing C types and names in their APIs. 259 should avoid exposing C types and names in their APIs.
254 Code that must recreate the old behavior can use <a href="/pkg/unsafe/#Pointer"> <code>unsafe.Pointer</code></a> 260 </p>
255 to force the conversion. 261
262 <p>
263 <em>Updating</em>: Code confusing pointers to incomplete types or
264 passing them across package boundaries will no longer compile
265 and must be rewritten.
266 If the conversion is correct and must be preserved,
267 use an explicit conversion via <a href="/pkg/unsafe/#Pointer"><code>unsafe.Point er</code></a>.
256 </p> 268 </p>
257 269
258 <h3 id="swig">SWIG 3.0 required for programs that use SWIG</h3> 270 <h3 id="swig">SWIG 3.0 required for programs that use SWIG</h3>
259 271
260 <p> 272 <p>
261 For Go programs that use SWIG, SWIG version 3.0 is now required. The 273 For Go programs that use SWIG, SWIG version 3.0 is now required.
262 <a href="/cmd/go"><code>cmd/go</code></a> command will now link the 274 The <a href="/cmd/go"><code>cmd/go</code></a> command will now link the
263 SWIG generated object files directly into the binary, rather than 275 SWIG generated object files directly into the binary, rather than
264 building and linking with a shared library. 276 building and linking with a shared library.
265 </p> 277 </p>
266 278
267 <h3 id="gc_flag">Command-line flag parsing</h3> 279 <h3 id="gc_flag">Command-line flag parsing</h3>
268 280
269 <p> 281 <p>
270 In the gc tool chain, the assemblers now use the 282 In the gc tool chain, the assemblers now use the
271 same command-line flag parsing rules as the Go flag package, a departure 283 same command-line flag parsing rules as the Go flag package, a departure
272 from the traditional Unix flag parsing. This may affect scripts that invoke 284 from the traditional Unix flag parsing.
273 the tool directly. 285 This may affect scripts that invoke the tool directly.
274 For example, 286 For example,
275 <code>go tool 6a -SDfoo</code> must now be written 287 <code>go tool 6a -SDfoo</code> must now be written
276 <code>go tool 6a -S -D foo</code>. 288 <code>go tool 6a -S -D foo</code>.
277 (The same change was made to the compilers and linkers in <a href="/doc/go1.1#gc _flag">Go 1.1</a>.) 289 (The same change was made to the compilers and linkers in <a href="/doc/go1.1#gc _flag">Go 1.1</a>.)
278 </p> 290 </p>
279 291
280 <h3 id="misc">Miscellany</h3> 292 <h3 id="misc">Miscellany</h3>
281 293
282 <p> 294 <p>
283 The program <code>misc/benchcmp</code> that compares 295 The program <code>misc/benchcmp</code> that compares
(...skipping 30 matching lines...) Expand all
314 </li> 326 </li>
315 327
316 <li> 328 <li>
317 The race detector (see <a href="/doc/articles/race_detector.html">this guide</a> ) 329 The race detector (see <a href="/doc/articles/race_detector.html">this guide</a> )
318 is now about 40% faster. 330 is now about 40% faster.
319 </li> 331 </li>
320 332
321 <li> 333 <li>
322 The regular expression package <a href="/pkg/regexp/"><code>regexp</code></a> 334 The regular expression package <a href="/pkg/regexp/"><code>regexp</code></a>
323 is now significantly faster for certain simple expressions due to the implementa tion of 335 is now significantly faster for certain simple expressions due to the implementa tion of
324 a second, one-pass execution engine. The choice of which engine to use is automa tic; 336 a second, one-pass execution engine.
337 The choice of which engine to use is automatic;
325 the details are hidden from the user. 338 the details are hidden from the user.
326 </li> 339 </li>
327 340
328 </ul> 341 </ul>
329 342
330 <p> 343 <p>
331 Also, the runtime now includes in stack dumps how long a goroutine has been bloc ked, 344 Also, the runtime now includes in stack dumps how long a goroutine has been bloc ked,
332 which can be useful information when debugging deadlocks or performance issues. 345 which can be useful information when debugging deadlocks or performance issues.
333 </p> 346 </p>
334 347
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 387
375 <p> 388 <p>
376 The following list summarizes a number of minor changes to the library, mostly a dditions. 389 The following list summarizes a number of minor changes to the library, mostly a dditions.
377 See the relevant package documentation for more information about each change. 390 See the relevant package documentation for more information about each change.
378 </p> 391 </p>
379 392
380 <ul> 393 <ul>
381 394
382 <li> 395 <li>
383 The complex power function, <a href="/pkg/math/cmplx/#Pow"><code>Pow</code></a>, 396 The complex power function, <a href="/pkg/math/cmplx/#Pow"><code>Pow</code></a>,
384 now specifies the behavior when the first argument is zero. It was undefined bef ore. 397 now specifies the behavior when the first argument is zero.
398 It was undefined before.
385 The details are in the <a href="/pkg/math/cmplx/#Pow">documentation for the func tion</a>. 399 The details are in the <a href="/pkg/math/cmplx/#Pow">documentation for the func tion</a>.
386 </li> 400 </li>
387 401
388 <li> In the <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package, 402 <li> In the <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package,
389 a new <a href="/pkg/crypto/tls/#DialWithDialer"><code>DialWithDialer</code></a> 403 a new <a href="/pkg/crypto/tls/#DialWithDialer"><code>DialWithDialer</code></a>
390 function lets one establish a TLS connection using an existing dialer, making it easier 404 function lets one establish a TLS connection using an existing dialer, making it easier
391 to control dial options such as timeouts. 405 to control dial options such as timeouts.
392 The package also now reports the TLS version used by the connection in the 406 The package also now reports the TLS version used by the connection in the
393 <a href="/pkg/crypto/tls/#ConnectionState"><code>ConnectionState</code></a> 407 <a href="/pkg/crypto/tls/#ConnectionState"><code>ConnectionState</code></a>
394 struct. 408 struct.
(...skipping 21 matching lines...) Expand all
416 allows setting an optional server error logger 430 allows setting an optional server error logger
417 with <a href="/pkg/net/http/#Server"><code>Server.ErrorLog</code></a>. 431 with <a href="/pkg/net/http/#Server"><code>Server.ErrorLog</code></a>.
418 The default is still that all errors go to stderr. 432 The default is still that all errors go to stderr.
419 </li> 433 </li>
420 434
421 <li> 435 <li>
422 The <a href="/pkg/net/http/"><code>net/http</code></a> package now 436 The <a href="/pkg/net/http/"><code>net/http</code></a> package now
423 supports disabling HTTP keep-alive connections on the server 437 supports disabling HTTP keep-alive connections on the server
424 with <a href="/pkg/net/http/#Server.SetKeepAlivesEnabled"><code>Server.SetKeepAl ivesEnabled</code></a>. 438 with <a href="/pkg/net/http/#Server.SetKeepAlivesEnabled"><code>Server.SetKeepAl ivesEnabled</code></a>.
425 The default continues to be that the server does keep-alive (reuses 439 The default continues to be that the server does keep-alive (reuses
426 connections for multiple requests) by default. Only 440 connections for multiple requests) by default.
427 resource-constrained servers or those in the process of graceful 441 Only resource-constrained servers or those in the process of graceful
428 shutdown will want to disable them. 442 shutdown will want to disable them.
429 </li> 443 </li>
430 444
431 <li> 445 <li>
432 The <a href="/pkg/net/http/"><code>net/http</code></a> package adds an optional 446 The <a href="/pkg/net/http/"><code>net/http</code></a> package adds an optional
433 <a href="/pkg/net/http/#Transport"><code>Transport.TLSHandshakeTimeout</code></a > 447 <a href="/pkg/net/http/#Transport"><code>Transport.TLSHandshakeTimeout</code></a >
434 setting to cap the amount of time HTTP client requests will wait for 448 setting to cap the amount of time HTTP client requests will wait for
435 TLS handshakes to complete. It's now also set by default 449 TLS handshakes to complete.
450 It's now also set by default
436 on <a href="/pkg/net/http#DefaultTransport"><code>DefaultTransport</code></a>. 451 on <a href="/pkg/net/http#DefaultTransport"><code>DefaultTransport</code></a>.
437 </li> 452 </li>
438 453
439 <li> 454 <li>
440 The <a href="/pkg/net/http/"><code>net/http</code></a> package's 455 The <a href="/pkg/net/http/"><code>net/http</code></a> package's
441 <a href="/pkg/net/http/#DefaultTransport"><code>DefaultTransport</code></a>, 456 <a href="/pkg/net/http/#DefaultTransport"><code>DefaultTransport</code></a>,
442 used by the HTTP client code, now 457 used by the HTTP client code, now
443 enables <a href="http://en.wikipedia.org/wiki/Keepalive#TCP_keepalive">TCP 458 enables <a href="http://en.wikipedia.org/wiki/Keepalive#TCP_keepalive">TCP
444 keep-alives</a> by 459 keep-alives</a> by default.
445 default. Other <a href="/pkg/net/http/#Transport"><code>Transport</code></a> 460 Other <a href="/pkg/net/http/#Transport"><code>Transport</code></a>
446 values with a nil <code>Dial</code> field continue to function the same 461 values with a nil <code>Dial</code> field continue to function the same
447 as before: no TCP keep-alives are used. 462 as before: no TCP keep-alives are used.
448 </li> 463 </li>
449 464
450 <li> 465 <li>
451 The <a href="/pkg/net/http/"><code>net/http</code></a> package 466 The <a href="/pkg/net/http/"><code>net/http</code></a> package
452 now enables <a href="http://en.wikipedia.org/wiki/Keepalive#TCP_keepalive">TCP 467 now enables <a href="http://en.wikipedia.org/wiki/Keepalive#TCP_keepalive">TCP
453 keep-alives</a> for incoming server requests when 468 keep-alives</a> for incoming server requests when
454 <a href="/pkg/net/http/#ListenAndServe"><code>ListenAndServe</code></a> 469 <a href="/pkg/net/http/#ListenAndServe"><code>ListenAndServe</code></a>
455 or 470 or
456 <a href="/pkg/net/http/#ListenAndServeTLS"><code>ListenAndServeTLS</code></a> 471 <a href="/pkg/net/http/#ListenAndServeTLS"><code>ListenAndServeTLS</code></a>
457 are used. When a server is started otherwise, TCP keep-alives are not enabled. 472 are used.
473 When a server is started otherwise, TCP keep-alives are not enabled.
458 </li> 474 </li>
459 475
460 <li> 476 <li>
461 The <a href="/pkg/net/http/"><code>net/http</code></a> package now 477 The <a href="/pkg/net/http/"><code>net/http</code></a> package now
462 provides an 478 provides an
463 optional <a href="/pkg/net/http/#Server"><code>Server.ConnState</code></a> 479 optional <a href="/pkg/net/http/#Server"><code>Server.ConnState</code></a>
464 callback to hook various phases of a server connection's lifecycle 480 callback to hook various phases of a server connection's lifecycle
465 (see <a href="/pkg/net/http/#ConnState"><code>ConnState</code></a>). This 481 (see <a href="/pkg/net/http/#ConnState"><code>ConnState</code></a>).
466 can be used to implement rate limiting or graceful shutdown. 482 This can be used to implement rate limiting or graceful shutdown.
467 </li> 483 </li>
468 484
469 <li> 485 <li>
470 The <a href="/pkg/net/http/"><code>net/http</code></a> package's HTTP 486 The <a href="/pkg/net/http/"><code>net/http</code></a> package's HTTP
471 client now has an 487 client now has an
472 optional <a href="/pkg/net/http/#Client"><code>Client.Timeout</code></a> 488 optional <a href="/pkg/net/http/#Client"><code>Client.Timeout</code></a>
473 field to specify an end-to-end timeout on requests made using the 489 field to specify an end-to-end timeout on requests made using the
474 client. 490 client.
475 </li> 491 </li>
476 492
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 Also, tests now write profiles (if invoked with profiling flags) even on failure . 547 Also, tests now write profiles (if invoked with profiling flags) even on failure .
532 </li> 548 </li>
533 549
534 <li> 550 <li>
535 The <a href="/pkg/unicode/"><code>unicode</code></a> package and associated 551 The <a href="/pkg/unicode/"><code>unicode</code></a> package and associated
536 support throughout the system has been upgraded from 552 support throughout the system has been upgraded from
537 Unicode 6.2.0 to <a href="http://www.unicode.org/versions/Unicode6.3.0/">Unicode 6.3.0</a>. 553 Unicode 6.2.0 to <a href="http://www.unicode.org/versions/Unicode6.3.0/">Unicode 6.3.0</a>.
538 </li> 554 </li>
539 555
540 </ul> 556 </ul>
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b