Go 1.2
Cooperative preemption via stackguard0. Funcdata/pcdata and pointer maps; precise stack scanning built but shipped opt-in (precisestack). New in-memory symbol table and pclntab. Three-index slices. Per-P allocator caches and persistentalloc.
Each area lists the stage every thread reached in this release (with what was left open afterwards), then changes that are not part of a thread. Thread names link to the full thread on its topic page.
Memory management
From Memory management: GC and allocator (Go 1.0–1.17)
Allocator refinement for per-P caches (whole-span transfer, inlined malloc fast path), persistentalloc, lazy page table and flexible 64-bit mapping; precise stack scan tried and reverted.
- Stop-the-world mark-sweep, then the parallel collector — Done: the collector runs on g0 instead of a goroutine stack (
71f061043d,de316388a7), and may not be triggered from g0 (dfdd1ba028); GC and the finalizer goroutine are synchronised for the preemptive scheduler (72c4ee1a9d);setGCPercentrace fixed (94dc963b55). Left open: nothing noted beyond stack precision. - Stack scanning: conservative, precise by frames, stack barriers, hybrid barrier, async safe points — Done: stack-by-frames scanning enabled (
0e6007e4f9) and then disabled (c3dadca977). Left open: cost ofgentracebackand incomplete precision. - Precise heap scanning: type information, the heap bitmap and GC programs — Done: type info for interface values (
21ea5103a4), array/slice fix (c6293d2106),cnewarray(5782f4117d). Left open: nothing noted. - Size classes, tiny allocator and mcache/mcentral — Done: whole-span transfers, inlined classification and MCache_Alloc, simplified MCache (
23ad563119,5a89b35bca,5166013f75,c4cfef075e,c075d82cca),persistentallocfor small metadata (47e0a3d7b1,86da989ee5). Left open: nothing noted. - Scavenger: returning memory to the OS — Done: Windows
SysUnused(4e76abbc60), scavenger details printed onFreeOSMemory(9f46efce52). Left open: nothing noted. - Heap address space: contiguous arena to sparse arenas — Done: lazy page table (
671814b904,8bbb08533d,ccd1d07cc4), flexible 64-bit mapping (a8ad859c30),persistentallocuse (99922aba8b). Left open: nothing noted. - Finalizers and span specials — Done: GC and finalizer goroutine synchronised (
72c4ee1a9d),SetFinalizer(func(interface{}))(6350e45892), no finalizers on g0 (6401e0f83f), frame in runfinq hidden (eb04df75cd). Left open: nothing noted. - Runtime allocators for runtime metadata and the port to Go — Done: persistentalloc, FixAlloc use (
47e0a3d7b1,86da989ee5,99922aba8b,4f514e8691),mheaphidden from GC (2a6520c2d3), all sys memory accounted (a33ef8d11b, see stats). Left open: nothing noted. - Memory statistics and accounting — Done: user-visible
GCSys,OtherSys, all sys memory accounted (a33ef8d11b), cheaper stats (5d637b83a9,c075d82cca). Left open: nothing noted.
Other changes
- Leaks and dead code internal — one-time Linux memory leak (
fd41926347), dead type-metadata allocation removed (0a904a3f2e),markfreedmessages (139cc96a57). - Heap-sizing fixes internal — MSpan.limit for large spans (
d6f89d735e), coalescing bug in heap (9ba551bb87), 64-bit atomiccas64(fb63e4fefb,f70a19f085), GC-time scan fixes (2f5825d427,50ba6e13b4,c51152f438,df3e6ce4b1), and not marking OS memory as executable on Windows (28f74608b5,3d513faa6f). - Rename FlagNoPointers to FlagNoScan internal — Renamed the malloc flag because it better describes objects that have pointers but that the GC should not scan. (
d0dd420a24)
Scheduler and concurrency
From Scheduler and concurrency runtime (Go 1.0–1.17)
Cooperative preemption of long-running goroutines (10ms), GODEBUG/schedtrace, stack and thread limits, Windows and Solaris pollers; threads: preemption, netpoll, diagnostics.
- The G-M-P scheduler: from global-lock M:N to per-P run queues, spinning Ms and work stealing — Done: fairness
4bb491b12e(global runqueue no longer starved when goroutines keep re-readying each other); CPU underutilization fixes15a1c3d1e4/32fef9908a(newproc/ready were “deliberately sloppy” about waking Ms);starttheworldracedbcfed93e7; sysmon no longer parks while goroutines run156e8b306d/658d19a53f; singleproc removedd5ab784611; stack size limit757e0de89fand thread count limit665feeedcb; LockOSThread fix4961483e7d; windows priority boost disableda574822f80. Left open: timers/locks still via notes. - Preemption: cooperative stack-check preemption (1.2) to signal-based asynchronous preemption (1.14) — Done: user-visible preempt function (
354ec51666, not yet used), preemption for GC (1e112cd59f), preempt goroutines running more than 10ms (bc31bcccd3), enabled by defaulta20784bdafafter temporary disable/re-enable (08e064135d,b913cf84dc,1da96a3039), debugging knob removed10ebb84d48, old gcwaiting checks removedf195ae94ca;notetsleepgandnotetsleepreturning false on timeout for preemptive sysmone97d677b4e,e932c2035f; sysmon polls network if idle >10ms6857264457. Left open: loops without function calls cannot be preempted. - Network poller: from the netFD select loop to the runtime-integrated epoll/kqueue/IOCP poller — Done: Windows poller moved into the runtime
6ea7bf253cwithGetQueuedCompletionStatusExbatching65834685d3; Solaris (event ports, level-triggered)50df1364831.3; netpoll refactors8486d96a27,2ea859a7791.3 (level-triggered IO); FreeBSD/ARMe82614e5be; deadlines for already-issued IOaaab946943;netFDfdMutex23e15f7253; fewer allocations per IO04b1cfa946; netpollready called once per event82ef961af5. - Timers: timerproc goroutine → per-bucket heaps → timers on Ps — Done: 4-ary heap
fcf6a7e5ce, monotonic clock on linux/386, amd6486c976ffd01.3,tsleepoverflow3548ab5ebb, fewer notewakeups in timerprocd1b66439f9, network timers crash9707f269c1. - Channels and select — Done: close/send race detection in select
62747bde6c; chan blocking profile incl. select and closec92287686d;closechanstack split10d1e55103. - Semaphores, runtime locks and Notes — Done:
notetsleepge97d677b4e;notetsleeptimeout resulte932c2035f. - sync.Mutex, RWMutex, WaitGroup, Cond, Once — Done: Cond without allocation
5a20b4a6a9; WaitGroup race fixes0f4897ae1a,07cb48c31f. - sync.Map, atomic.Value and sync/atomic — Done: user-visible
Swapfunctions0e15b03f93,883530c019,66c58cea67. - Goroutine and M lifecycle: caches, ids, LockOSThread, Goexit, cgo extra Ms, deadlock detection — Done: deadlock in cgo programs
34c67eb24e;Goexitduring init14062efb16; false deadlock1da1030b5d; traceback of running goroutines viafreezetheworld01f1e3da48. - Stop-the-world, safe points and GC–scheduler interaction — Done: preempt goroutines for GC
1e112cd59f;stoptheworldracedbcfed93e7. - Scheduler diagnostics: schedtrace, GODEBUG, execution tracer, block/mutex profiles — Done: user-visible
GODEBUG4b536a550f,schedtrace/scheddetail4f2e382c9f, creator in running tracebackc33d490020, block profile for channelsc92287686d. - GOMAXPROCS, thread and resource limits — Done: user-visible stack and thread limits
757e0de89f,665feeedcb.
Other changes
- netFD fdMutex and net allocations internal —
23e15f7253,04b1cfa946. - Misc runtime internal — GODEBUG-gated
e69012ce2a, goroutine stack accounting187b9c695f, fix traceback with cgo326ae8d14e,33bd9694cd. - Small scheduler/poller fixes after the preemptive scheduler internal —
fee1d1cda0(G status after syscall),b65271d008,ae5991695c,91d35ad1b8(Windows netpoll blocked-call deadlock),a0935cc979,8f746af65d,5290e55164(persistentalloc in netpoll),38abb09a2e,cc0a005c9d,0286b4738e,e33e476e07(disable CPU profiling around fork),d91219e458,3d6bce411c,1308194204. - Plumbing internal —
081129e286,b36f2db12a,ab1270bcfc,3453a2204b,f8a850b250,c7d5c438a2,a05237f20a,8b789e1738,ce9ddd0eee,6d68fc8eea,16d6b6c771,551ada4742,828a4b9376,c4579635cf. - Traceback of goroutines in syscalls internal — Traceback of goroutines in syscalls uses gcpc/gcsp, which are more stable than gp->sched because sched is mutated by entersyscall. (
f73972fa33,9c0500b466)
Data structures and type metadata
From Runtime data structures and type metadata (Go 1.0–1.17)
Hash lookup shortcuts, hashmap internals get typed GC info instead of bespoke GC code, itabs from persistentalloc, faster x86 memmove, Slice3, and ARM softfloat/preemption fixes.
- Hash map core: from the first hashmap.c to the 8-entry bucket design — Done:
Hmapcut to 48 bytes (4042b77776), hash-lookup shortcuts for same-length strings (a696ae56db), type information recorded for the internal structures and all hashtable-specific GC code removed (fb376021be, preceded by0df438c683telling GC not to scan them), fix for iterator/growth/NaN-key interaction (869368a528), shorter lookup stack frames (a3f842a4c1). Left open: accessors still took key/value by value via C varargs. - Map growth, iteration order, overflow buckets and GC interaction — Done: typed GC data replaces bespoke GC code (
fb376021be), iterator/NaN/growth bug (869368a528). Left open: nothing noted. - Map fast paths and compiler/runtime specialization — Done: lookups optimized with same-length string checks (
a696ae56db,BenchmarkSameLengthMap43→4 ns). - Interface values, itabs and type assertions — Done: itabs from
persistentalloc(b36f2db12a),SetFinalizeraccepts any compatible f (5822e7848a), wrappers for blank-interface methods skipped (f316a7ea87). - reflect redesign: from string parsing to Type/Value structs — Done: user-visible
Value.Slice3,SetCap(4d8aefde47);Interfaceof non-addressable no longer allocates (94179d61ab,InterfaceBig90→14 ns),Convertindir-bit fix (0e73497a4b),DeepEqualvisit key (f7b5a01999,780f5b714d), call arguments exposed to GC (0ab8f2d287). - memmove, memclr, duff routines and pointer-write atomicity — Done: fast x86 memmove (
6021449236), ARM memmove parameter corruption fix (f8fd77baa9). - internal/bytealg and string/byte comparison primitives — Done:
Comparefor bytes/strings (b3946dc119). - Strings: concatenation, conversion and printing helpers — Done: correct types for
maxstring/concatstring(98a80b95b4,249f807c39). - Soft-float, 64-bit division and complex arithmetic helpers — Done: no preemption in softfloat, argument/frame records (
e03dd07981,8166b2da19,6a13897bc6,cba880e04a), 386 uint64 division (70138a2108),timedivavoiding_vasop(c7d5c438a2).
Other changes
- Hashtable/reflect constants and docs internal —
BUCKETSIZE/MAXKEYSIZE/MAXVALSIZEunexported from reflect (da50221e8e), FieldByName shortcoming documented (7fb3d8e45e). - ARM/Plan 9 build fixes in data files internal —
64db2ec915,14e3540430,184b02ea9f,33bd9694cd,9ddfb64365(argument size recorded in assembly functions),249f807c39,98a80b95b4,f4f2cf16b0. - Debug enums internal —
e69012ce2auses enums so dead code is eliminated. - Complex types have no pointers internal —
4949dcb211.
Diagnostics and knobs
From Diagnostics and knobs (Go 1.0–1.17)
Block profiler gains select/close support; race instrumentation fixes; "created by" in tracebacks.
- Race detector integration — Done:
Read/Writesyscalls annotated with the memory they touch (fc80764792); instrumentation of for loops, arrays, selectors, type switches fixed (591d58a3bb,3be794cdc2,6c4943cb51,a15074c4dc,e7657de717);forkAndExecInChildexcluded since instrumentation may allocate and preempt (63e0ddc7bf); no preemption of race calls (d017f578d0); unusedstepparam removed (e2d95c1f24). Left open: nothing noted. - CPU profiler and runtime/pprof writers (legacy format to compressed protobuf) — Done: user-visible block profiler supports select, channel close and shows the top frame in debug mode (
c92287686d);SetBlockProfileRatecorner cases fixed (3bd0b0a80d); memory profiler usespersistentalloc(8cf7044983); “created by” printed for running goroutines (c33d490020). Left open: nothing noted. - GODEBUG, runtime/debug, debug log and traceback knobs — Done: thread count limit (
665feeedcb); m stack shown on crash (ab38e2a498). Left open: nothing noted. - Traceback correctness and inlining (diagnostic output) — Done: traceback/GC boundary (
e58f798c0c), arg printing (eac6bee7c1), Windows (0a3bd045f51.3, 1.3), up-to-10 args (c40480ddd91.3). Left open: nothing noted. - GDB runtime support — Done: explicit init of helpers (
927b7ac327, 1.2).
Other changes
- Unused declarations removed internal (
15baf6b4ac). - Traceback/GC boundary adjusted internal (
e58f798c0c), crash-on-m-stack display (ab38e2a498), explicit runtime-gdb init (927b7ac327), thread limit (665feeedcb). - Race runtime update user-visible — Updated the race runtime to r183644, which handles memory range accesses properly. (
cc99e6e949)
OS layer, stacks and panics
From OS interface, stacks and panics (Go 1.0–1.4)
Preemptive scheduling via stackguard0, rewindmorestack prologue, 8 kB segments and the 1 GB stack limit, -shared/external linking on ARM, dragonfly, lazy extra M, wrapper-aware recover.
- Segmented stacks to contiguous (copied) stacks — Done: user-visible 4 kB to 8 kB default segment (
408238e20b); stack-size limit757e0de89f;f0d73fbc7cusesgp->sched.spfor the overflow check;6fa3c89b77records proper goroutine state during split (see prologue thread);ebc5513be6double-checks the calling goroutine in newstack;fd23958f49fixes memory leaks where deferargp/pcpointed into freed segments. Left open: the commit message of408238e20bcalls 8 kB a stopgap pending new stacks. - Stack-split prologue, nosplit budget and C-on-Go-stack detection — Done:
6fa3c89b77rewindmorestack;a83748596c,9ddfb64365record argument size in assembly functions and use it for frames;58f12ffd79,13507e0697morestack/lessstack in tracebacks;e84d9e1fb3no stack splits in syscall status (newnotetsleepg, entersyscall/exitsyscall arranged not to call split functions) with the follow-upsd83688165a,ddc01d5b06,21315c3428;12e46e42eccall trampolines not NOSPLIT;9cd570680b/034d5fcc30reimplement then restore the oldreflect.call(the no-split version was dropped for cgo);5a54696d78,0273dc131e,e838334beb,ed467db6d8replace numeric textflags by symbolicNOSPLIT|DUPOK|NOPROF. Left open: nosplit headroom is tight. - Goroutine preemption (stackguard0, 10 ms and GC preemption) — Done: user-visible preemption of tight loops that call functions:
f5becf4233,354ec51666,d67e7e3acf,1e112cd59f,bc31bcccd3,ef12bbfc9d,4eb17ecd1f. Left open: loops with no function calls are not preempted (the mechanism needs a prologue check). - Panic, defer, recover and Goexit — Done:
7276c02b41panicwrap;ef12bbfc9d;fa4984d535shows theruntime.panicframe in tracebacks. Left open: panicwrap accounting wrong (replaced in 1.4). - Tracebacks, crash output and GOTRACEBACK — Done:
fa4984d535,cc84176108,13507e0697,58f12ffd79,326ae8d14e,16d6b6c771(PCDATA reader exported),32b770b2c0(jump tobadmcallso traceback reports the caller of mcall). Left open: nothing noted. - Symbol tables, pclntab and runtime.Caller/FuncForPC — Done:
persistentalloc83445fdcc3; PCDATA reader exported16d6b6c771;ed467db6d8. Left open: nothing noted. - Signals: handling, os/signal, foreign threads — Done:
2f1ead7095,ae73b90369,e555172592(NetBSD/ARM sigreturn). Left open: nothing noted. - Threads, locks and the OS scheduler interface — Done:
a574822f80(Windows priority boost);45cff65502switch to OS stack in Windowsosyield/usleep;dfdd1ba028no GC on g0;6401e0f83fno finalizers on g0;34c67eb24elazy extra M. Left open: nothing noted. - cgo runtime support and non-Go threads — Done: user-visible
34c67eb24e;dba623b1c7,f011282578cgocallback_gofunc work;2560f8fe22,cb30917387NOSPLIT callbacks; cgo on dragonfly2b44b36487;397ba2cb4a. Left open: nothing noted. - TLS, g/m registers and shared-library linking — Done: user-visible
45233734e2external linking on ARM and-shared;d8fd8d89ea;3ec0427a07,254dc5fdbeARMv5T target;e0db7fae871.1 was 1.1. Left open: “this CL only addresses the low level linker work”. - Windows runtime port — Done: user-visible
a574822f80;6ea7bf253c,65834685d3;05a5de30f0;4216203bcf. Left open: nothing noted. - Platform ports: OS and architecture matrix — Done: user-visible dragonfly
ac00524beb,465ba6b78c,2b44b36487;6252b41981removes OABI check;649a2a9be5;555da73c56;ff86d222befixes syscall numbers on freebsd/openbsd 386. Left open: “still some breakages” on freebsd/arm. - Integrated network poller: OS back-ends — Done:
c5732c8526,c4cdd35e6e,e82614e5be,6ea7bf253c,65834685d3. Left open: nothing noted.
Other changes
- Small 1.2 changes internal — Plan 9
usleepNOSPLIT (8b85a3d480), removal ofbadcallbackfunctions (a3e0002e6a),jmpdeferargument size (a97a91de06),intgofor findnull (82f5ca1ef0), ARM formatting and port builds (92254d4463,48c0d8b6e2,a70cbf1329,e5cbebc1ad,cefdb9c286), style (83d4cd758c). - Profiling signal accounting user-visible —
cc4e6aad8estops losing CPU profile signals (GC, stack splits, syscalls were previously absent);4207897dccprofiles on g0;439f9397fcavoids inconsistent goroutine state in the profiler. - runtime.nanotime on BSDs / timediv internal —
98cc58e2c7,d83688165a. - Defer leak internal —
fd23958f49. - IndexByte in runtime internal —
e2a1bd68b3,598c78967f,b3946dc119(bytes.Compare),ee66972dce. - append inlined internal —
045dbeaf05frontend append;8ce8adbe7a. - Static data internal —
e017e0cb24marks statics no-pointers. - Symbolic textflags internal — see prologue thread.
- Windows defs and comment fixes internal — Updated defs_windows files and fixed comments since g->gobuf became g->sched. (
9bc0eaf60e,528534c1d4)
Compiler frontend
From Compiler frontend (Go 1.1–1.9)
Three-index slices (b4e92cee97), precise stack collection built but disabled (30ecb4cd05), large stack variables moved to heap, many inlining-export and message fixes.
- Parser: from yacc to a hand-written recursive-descent parser — Done:
b4e92cee97and8cd6341cf8add full slice expressionsx[i:j:k]togo.y(12 files; commit says “experimental … may not be included in the release”, then allowed in), see language thread;d00bd1d1f4C-style-if message. Left open: nothing noted. - Binary export data and the object-file split — Done:
78f5b616fc,62891fb811,20ebee2c31,c1fc8d5296,a85cfbd433(tag builtin error/byte/rune so they are not exported),8d6bc666fb(qualified embedded fields with owner package),a9e119ac70. Left open: nothing noted. - Inlining — Done:
49da9a8e44,ae5e791ed2. - Escape analysis and stack allocation — Done:
1f4d58ad5d,7cfa8310c7. - Closures, method values and variable capture — Done:
0d0d57ccfe(_initializers in closures),280c8b90e2unique method names for function-scoped types. - Language changes and rules as implemented in the compiler — Done: user-visible
b4e92cee97,8cd6341cf8;880d869764init order for top-level blank vars;66c8935f73initialization loop detection;933d7129c0;903c2fda18(_ = nil). - Write barriers, precise stacks and liveness (compiler side) — Done:
30ecb4cd05precisestack off by default;f91e682ccashorter bitmaps. Left open: call-site pointer bitmaps “not ready in time”. - Race detector and sanitizer instrumentation in the frontend — Done:
e440354c40,3be794cdc2,269b2f2d4d. - Diagnostics and error messages — Done:
703b897f78,d00bd1d1f4,2254785c3e,8d530f2472.
Other changes
- Stack/array fixes internal —
b15a64e35dreset haspointers computation,bf9a00bc8foverflow in array bounds calculation,428ea6865cequality class,66e8471391missing package is fatal,27d17255db,cd2eb48722,e9453e0545,7d734d9252(C undefined behaviour),04c40c97c3(no algs for internal map types),3ac5d54cf9,6f5af9c0b1,1d4ed0c86b,7e270cf6c4,7dba510c7b,e1ac15743b,85195e2ccf,a85cfbd433,8d530f2472,5be1821a31,abe384f68a.
Middle end and SSA optimizer
From Middle end and SSA optimizer (Go 1.0–1.9)
Small: escape-driven stack make, redundant bounds checks dropped in inlined append and slicing (threads: escape analysis, order/walk).
- Escape analysis (esc.c → esc.go) — Done:
2c4b029b75(make([]T, const)uses the escape result),148fac79a3ordering fix. Left open: nothing noted. - Order, walk and temporary lifetimes (order.c, walk.c) — Done: inlined
appendloses a useless bounds check (4b0eb19a05), redundant slice bound check removed (19e2922688),panicsliceunlikely (7c8be15b8a), constants not leaked to backends (d7c99cdf9f). Left open: nothing noted.
Other changes
- Misc internal —
fc3bec386e,ae5e791ed2(save local var list before inlining),c929ac5f7e,a7d8b35aac,0218dfe7eb,51266761fd,36f8480965.
Backends and assemblers
From Backends and assemblers (Go 1.0–1.6)
Groundwork for precise GC: funcdata/pcdata, pointer maps from cc and gc, zeroing of pointers on entry, proginfo, portable optimizer code and temporary merging. Threads: pointer maps/liveness, register allocator.
- Per-architecture compilers 6g/8g/5g/9g and the shared gc code generator — Done: trampolines moved to portable code (
1f51d27922,31be5deae4),proginfoin every back end (see optimizer thread). Left open: nothing noted. - Register allocation and the peephole optimizer (reg.c, peep.c) — Done:
proginfoin all three (24c8035fbe,ac0df6ce89,a07218385c,9a0a59f171); portable optimization logic and flow graph (b3b87143f2,dbf96addfb); temporary-merging pass using greedy linear scan (Poletto-Sarkar), cutting the number of functions with too many vars in godoc from 83 to 32 (fa72679f07,72636eb506); O(n) reset loop removed from copyprop (6d47de2f40); faster compilation by memset (06e686def6); MOVBS/MOVHS pseudo-instructions on ARM to make short-integer semantics explicit (3670337097,357f733695). Left open: the back ends only track the first 128 variables per function (commit text,fa72679f07). - Expression and statement code quality in 6g/8g/5g (division, bounds checks, loops, slices, interfaces) — Done: copy inlined as memmove (
ff416a3f19), nil-check on&xand removal of redundant&x.Fieldchecks (999a36f9af,aa0439ba65), 6c/8c avoid long multiplication (2c0b00744f), full 64-bit address in block copy (f268c295a3), very wide offsets (9c21ce54dd), no constant propagation of non-constant LEA (3c3ce8e7fb), clearfat de-interleaved (85a7c090c4),defercaller line numbers via a real NOP (7e97d39879; XCHG AX,AX / AND.EQ R0,R0,R0). - Stack frames, pointer maps and liveness analysis in the compiler — Done: funcdata/pcdata plumbing (
48769bf546,47b89a37d9,8c741c97f7,de6da4a8bd), C and Go argument/locals bitmaps (9b1f1833de,73c93a404c,2db5e4bb0b), interface encoding (abc516e420,21ea5103a4), zero pointers on entry (7910cd68b5,3b4d792606,d3b04f46b5,390656affd), nosplit pointer maps from the linker (037a1a9f31), . Left open: maps conservative; liveness analysis not written (commit text: “intermediate step”). - Stack frame layout, prologues, stack split and frame pointers — Done: pointer-map-aware zeroing of frames and
stkptrsize(d3b04f46b5,390656affd). - The Plan 9 C compilers (cc, 5c/6c/8c) in the Go toolchain — Done: cc rejects unions with pointers (
dbee8ad0f9), isolated textflag/dataflag (2449909d81), wide-char fix (5b15b44434), full 64-bit block copy (f268c295a3), pointer maps (9b1f1833de,2db5e4bb0b),%Q(237e7c134c), AFUNCDATA PC fix (de6da4a8bd), fix undefined behaviour (8d5ec52e6c). - Assemblers: 5a/6a/8a/9a and the Go cmd/asm — Done: flag parsing (
8124a02cb2), PCDATA/FUNCDATA (47b89a37d9,8c741c97f7),m/gfor ARM (5d081792b6), MOVBS/MOVHS (3670337097).
Other changes
- Non-escaping &x internal —
&xpanics if x does, inserting checks (999a36f9af) with redundancy removal (aa0439ba65),checknilfix (b75a08d03c). - Temporary lifetimes internal — greedy temporary merging, with the back ends tracking only 128 variables (
fa72679f07). - Plan 9 and portability internal — consistent
BGETC/BPUTC(79dca0327e), UB removals (7d734d9252,8d5ec52e6c,fd7ddad160), simplified bitmap loop (af2a3193af). - Deferred call line numbers user-visible — traceback line number of the deferred call frame (
7e97d39879). - cgo internal — retain Go pointer passed to C for duration of the call (
5639d2754b). - Remaining small code-generation, optimizer and tooling fixes (3 commits) internal — per-operator and per-back-end bug fixes and cleanups that do not carry design of their own: proglist prototypes, R13/F3 clash on 5g, 8g instruction descriptions (
4fc7ff497d,bf58d20999,b27e09331c) - Build, portability and warning fixes (1 commits) internal — Plan 9/gcc/clang warnings, yacc/bison, format verbs, buffer sizes, output-file handling and Windows paths in the compilers/assemblers/liblink (
acd887ba57) - Compiler op constants and misc internal — Reordered gc O* constants, renamed ORRC to ORROTC, and used ArgsSizeUnknown for functions with unknown argument size. (
6fc49c1854)
Linker and object files
From Linker and object files (Go 1.0–1.9)
New in-memory symbol table and contiguous pclntab with FUNCDATA GC metadata and argument bitmaps; ARM external linking and TLS merge.
- Go symbol table, pc/line table and function metadata (gosymtab, pclntab, findfunc) — Done: new in-memory symtab (
5d363c6357), contiguous pcln table (c3de91bb15), funcdata for GC info (48769bf546), argument pointer bitmaps (4e0a51c210), file table shrunk (d011f0aa89),-sno longer discards pclntab (0d85d5423b),-vreports pclntab/funcdata sizes (d43ee1b714). Left open: linker still emitted per-function pcln from instruction lists. - Stack splitting and the linker’s nosplit overflow check — Done: large-frame stack split for the preempt check fixed (
031c107cad) and the stack-split code refactored (1a6576db34). - DWARF generation in the linker — Done:
.debug_framerelocations in external link mode (28bbc6c27a); fieldtrack line fix (a14e143c21). - External (host) linking and cgo — Done: ARM external linking and
-sharedin terms of external linking (45233734e2);.tbssfor dynamic internal linking (a848475324); duplicate static symbols in COFF/Mach-O (9add729a1f); PE label symbols (c742179c49). - Build modes: -shared, c-archive, c-shared, shared, PIE, plugin — Done:
-sharedthrough external linking on ARM (45233734e2). - Runtime type data, GC metadata and sections laid out by the linker — Done:
gcdata/gcbssfix (251baea1af), textflag constants in a shared header (5a54696d78), GC metadata via funcdata (48769bf546). - Container writers: Windows PE, Mach-O and Plan 9 — Done: COFF duplicates and labels (
9add729a1f,c742179c49),_image_base__fix (60513bf2f4). - Architecture and OS ports in the linker (arm, power64, arm64, mips, s390x, nacl, BSDs, Solaris) and trampolines — Done: DragonFly (
71dc91db0f,fd0af9b56c),UNDEFfix for 5l (ed6dce6f9d), MOVBS/MOVHS (3670337097,5636b60b70), PCLMULQDQ (6bea504b94). - Build IDs, ABI hashes, flags and determinism — Done:
-sdocumented and passed to gcc (71051953e0,e50e4f7ec1).
Other changes
- Misc linker work internal — use one-byte XCHG forms (
aad4720b51), NOP of$x+10(SP)(26d43a0f22), PCDATA accepted (567818224e), error buffer size (6c99b5c0d3),iselfcheck cleanup (3b4da67ee3),-installsuffix(0a033a18ad), libbio BGETC macros (79dca0327e), dragonfly interp path, wrapperRET.EQfix (3acddba2ec), fix of4984e6e9fdframe-size printing, “undefined behavior” cleanups (6034406eae). - Remaining 1.2 ld work internal — read-only data placed in a non-executable segment (
d6d83c918c),-vverbosity levels (b99fa81555), Plan 9 and build fixes (0b88587d22,328ec95878,b015af4117,32a3ce6799,4984e6e9fd,308a3e6c52,e18ed3c111,80a153dd51,e38eddbfe4).