Merge tag 'go1.17' into HEAD

Change-Id: Ibbcee39411850715ce3ada3b267cb846cceca82e
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index ee50a4c..1984d44 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -33,6 +33,7 @@
 Aaron Jensen <jensen.aaro@gmail.com>
 Aaron Kemp <kemp.aaron@gmail.com>
 Aaron Patterson <tenderlove@ruby-lang.org>
+Aaron Sheah <aaronsheah@gmail.com>
 Aaron Stein <aaronstein12@gmail.com>
 Aaron Torres <tcboox@gmail.com>
 Aaron Zinman <aaron@azinman.com>
@@ -47,6 +48,7 @@
 Adam Kisala <adam.kisala@gmail.com>
 Adam Langley <agl@golang.org>
 Adam Medzinski <adam.medzinski@gmail.com>
+Adam Mitha <adam.mitha@gmail.com>
 Adam Shannon <adamkshannon@gmail.com>
 Adam Shelton <aashelt90@gmail.com>
 Adam Sindelar <adamsh@google.com>
@@ -54,6 +56,8 @@
 Adam Williams <pwnfactory@gmail.com>
 Adam Woodbeck <adam@woodbeck.net>
 Adarsh Ravichandran <adarshravichandran91@gmail.com>
+Adel Rodríguez <adel.rodriguez@leftfieldlabs.com>
+Adin Scannell <ascannell@google.com>
 Aditya Harindar <aditya.harindar@gmail.com>
 Aditya Mukerjee <dev@chimeracoder.net>
 Adrian Hesketh <adrianhesketh@hushmail.com>
@@ -68,6 +72,7 @@
 Agis Anastasopoulos <agis.anast@gmail.com>
 Agniva De Sarker <agnivade@yahoo.co.in>
 Ahmed W. Mones <oneofone@gmail.com>
+Ahmet Aktürk <aakturk000@gmail.com>
 Ahmet Alp Balkan <ahmetb@google.com>
 Ahmet Soormally <ahmet@mangomm.co.uk>
 Ahmy Yulrizka <yulrizka@gmail.com>
@@ -92,11 +97,13 @@
 Alberto Donizetti <alb.donizetti@gmail.com>
 Alberto García Hierro <alberto@garciahierro.com> <alberto.garcia.hierro@gmail.com>
 Alec Benzer <alec.benzer@gmail.com>
+Alejandro García Montoro <alejandro.garciamontoro@gmail.com>
 Aleksa Sarai <cyphar@cyphar.com>
 Aleksandar Dezelin <dezelin@gmail.com>
 Aleksandr Lukinykh <a.lukinykh@xsolla.com>
 Aleksandr Razumov <ar@cydev.ru>
 Alekseev Artem <a.artem060@gmail.com>
+Aleksei Tirman <aleksei.tirman@jetbrains.com>
 Alessandro Arzilli <alessandro.arzilli@gmail.com>
 Alessandro Baffa <alessandro.baffa@gmail.com>
 Alex A Skinner <alex@lx.lc>
@@ -165,6 +172,7 @@
 Aliaksandr Valialkin <valyala@gmail.com>
 Alice Merrick <amerrick@google.com>
 Alif Rachmawadi <subosito@gmail.com>
+Allan Guwatudde <guwats10@gmail.com>
 Allan Simon <allan.simon@supinfo.com>
 Allen Li <ayatane@google.com>
 Alok Menghrajani <alok.menghrajani@gmail.com>
@@ -172,6 +180,7 @@
 Aman Gupta <aman@tmm1.net>
 Amarjeet Anand <amarjeetanandsingh@gmail.com>
 Amir Mohammad Saied <amir@gluegadget.com>
+Amit Kumar <mittalmailbox@gmail.com>
 Amr Mohammed <merodiro@gmail.com>
 Amrut Joshi <amrut.joshi@gmail.com>
 An Long <aisk1988@gmail.com>
@@ -185,6 +194,7 @@
 André Martins <aanm90@gmail.com>
 Andre Nathan <andrenth@gmail.com>
 Andrea Nodari <andrea.nodari91@gmail.com>
+Andrea Simonini <andrea.simonini@gmail.com>
 Andrea Spadaccini <spadaccio@google.com>
 Andreas Auernhammer <aead@mail.de>
 Andreas Jellinghaus <andreas@ionisiert.de> <anj@google.com>
@@ -244,6 +254,7 @@
 Andy Walker <walkeraj@gmail.com>
 Andy Wang <cbeuw.andy@gmail.com>
 Andy Williams <andy@andy.xyz>
+Andy Zhao <andyzhao@google.com>
 Andzej Maciusovic <andzej.maciusovic@gmail.com>
 Anfernee Yongkun Gui <anfernee.gui@gmail.com>
 Angelo Bulfone <mbulfone@gmail.com>
@@ -269,6 +280,7 @@
 Antonin Amand <antonin.amand@gmail.com>
 Antonio Antelo <aantelov87@gmail.com>
 Antonio Bibiano <antbbn@gmail.com>
+Antonio Garcia <garcia.olais@gmail.com>
 Antonio Huete Jimenez <tuxillo@quantumachine.net>
 Antonio Murdaca <runcom@redhat.com>
 Antonio Troina <thoeni@gmail.com>
@@ -292,8 +304,10 @@
 Artem Kolin <artemkaxboy@gmail.com>
 Arthur Fabre <arthur@arthurfabre.com>
 Arthur Khashaev <arthur@khashaev.ru>
+Artur M. Wolff <artur.m.wolff@gmail.com>
 Artyom Pervukhin <artyom.pervukhin@gmail.com>
 Arvindh Rajesh Tamilmani <art@a-30.net>
+Ashish Bhate <ab.listsubs@gmail.com>
 Ashish Gandhi <ag@ashishgandhi.org>
 Asim Shankar <asimshankar@gmail.com>
 Assel Meher <asselmeher@gmail.com>
@@ -325,6 +339,7 @@
 Barnaby Keene <accounts@southcla.ws>
 Bartosz Grzybowski <melkorm@gmail.com>
 Bartosz Oler <brtsz@google.com>
+Bassam Ojeil <bojeil@google.com>
 Bastian Ike <bastian.ike@gmail.com>
 Ben Burkert <ben@benburkert.com>
 Ben Cartwright-Cox <Ben@Benjojo.co.uk>
@@ -332,6 +347,7 @@
 Ben Fried <ben.fried@gmail.com>
 Ben Haines <bhainesva@gmail.com>
 Ben Hoyt <benhoyt@gmail.com>
+Ben Hutchings <ben.hutchings@essensium.com>
 Ben Kraft <benkraft@khanacademy.org>
 Ben Laurie <ben@links.org> <benl@google.com>
 Ben Lubar <ben.lubar@gmail.com>
@@ -430,6 +446,7 @@
 Carl Jackson <carl@stripe.com>
 Carl Johnson <me@carlmjohnson.net>
 Carl Mastrangelo <notcarl@google.com>
+Carl Menezes <carleeto@gmail.com>
 Carl Shapiro <cshapiro@google.com> <cshapiro@golang.org>
 Carlisia Campos <carlisia@grokkingtech.io>
 Carlo Alberto Ferraris <cafxx@strayorange.com>
@@ -443,6 +460,7 @@
 Carlos Souza <carloshrsouza@gmail.com>
 Carolyn Van Slyck <me@carolynvanslyck.com>
 Carrie Bynon <cbynon@gmail.com>
+Carson Hoffman <c@rsonhoffman.com>
 Cary Hull <chull@google.com>
 Case Nelson <case.nelson@gmail.com>
 Casey Callendrello <squeed@gmail.com>
@@ -462,6 +480,7 @@
 Charles L. Dorian <cldorian@gmail.com>
 Charles Lee <zombie.fml@gmail.com>
 Charles Weill <weill@google.com>
+Charlie Moog <moogcharlie@gmail.com>
 Charlotte Brandhorst-Satzkorn <catzkorn@gmail.com>
 Chauncy Cullitan <chauncyc@google.com>
 Chen Zhidong <njutczd@gmail.com>
@@ -516,6 +535,7 @@
 Christopher Nielsen <m4dh4tt3r@gmail.com>
 Christopher Redden <christopher.redden@gmail.com>
 Christopher Swenson <cswenson@google.com>
+Christopher Thomas <53317512+chrisssthomas@users.noreply.github.com>
 Christopher Wedgwood <cw@f00f.org>
 Christos Zoulas <christos@zoulas.com> <zoulasc@gmail.com>
 Christy Perez <christy@linux.vnet.ibm.com>
@@ -541,6 +561,8 @@
 Costin Chirvasuta <ctin@google.com>
 Craig Citro <craigcitro@google.com>
 Cristian Staretu <unclejacksons@gmail.com>
+Cristo García <cgg.code@gmail.com>
+cui fliter <imcusg@gmail.com>
 Cuihtlauac ALVARADO <cuihtlauac.alvarado@orange.com>
 Cuong Manh Le <cuong@orijtech.com>
 Curtis La Graff <curtis@lagraff.me>
@@ -560,6 +582,7 @@
 Dan Harrington <harringtond@google.com>
 Dan Jacques <dnj@google.com>
 Dan Johnson <computerdruid@google.com>
+Dan McArdle <dmcardle@google.com>
 Dan Peterson <dpiddy@gmail.com>
 Dan Pupius <dan@medium.com>
 Dan Scales <danscales@google.com>
@@ -611,6 +634,7 @@
 David Anderson <danderson@google.com>
 David Barnett <dbarnett@google.com>
 David Benjamin <davidben@google.com>
+David Black <dblack@atlassian.com>
 David Bond <davidsbond93@gmail.com>
 David Brophy <dave@brophy.uk>
 David Bürgin <676c7473@gmail.com>
@@ -654,6 +678,7 @@
 Dean Eigenmann <7621705+decanus@users.noreply.github.com>
 Dean Prichard <dean.prichard@gmail.com>
 Deepak Jois <deepak.jois@gmail.com>
+Deepak S <deepakspavoodath@gmail.com>
 Denis Bernard <db047h@gmail.com>
 Denis Brandolini <denis.brandolini@gmail.com>
 Denis Isaev <idenx@yandex.com>
@@ -676,8 +701,10 @@
 Dhruvdutt Jadhav <dhruvdutt.jadhav@gmail.com>
 Di Xiao <dixiao@google.com>
 Didier Spezia <didier.06@gmail.com>
+Diego Medina <fmpwizard@gmail.com>
 Diego Siqueira <diego9889@gmail.com>
 Dieter Plaetinck <dieter@raintank.io>
+Dilyn Corner <dilyn.corner@gmail.com>
 Dimitri Sokolyuk <sokolyuk@gmail.com>
 Dimitri Tcaciuc <dtcaciuc@gmail.com>
 Dina Garmash <dgrmsh@gmail.com>
@@ -714,6 +741,7 @@
 Douglas Danger Manley <doug.manley@gmail.com>
 Drew Flower <drewvanstone@gmail.com>
 Drew Hintz <adhintz@google.com>
+Drew Richardson <drewrichardson@gmail.com>
 Duco van Amstel <duco.vanamstel@gmail.com>
 Duncan Holm <mail@frou.org>
 Dustin Carlino <dcarlino@google.com>
@@ -735,6 +763,7 @@
 Ehren Kret <ehren.kret@gmail.com>
 Eitan Adler <lists@eitanadler.com>
 Eivind Uggedal <eivind@uggedal.com>
+El Mostafa Idrassi <el.mostafa.idrassi@gmail.com>
 Elbert Fliek <efliek@gmail.com>
 Eldar Rakhimberdin <ibeono@gmail.com>
 Elena Grahovac <elena@grahovac.me>
@@ -742,6 +771,7 @@
 Elias Naur <mail@eliasnaur.com> <elias.naur@gmail.com>
 Elliot Morrison-Reed <elliotmr@gmail.com>
 Ellison Leão <ellisonleao@gmail.com>
+Elvina Yakubova <elvinayakubova@gmail.com>
 Emerson Lin <linyintor@gmail.com>
 Emil Bektimirov <lefelys@gmail.com>
 Emil Hessman <emil@hessman.se>
@@ -767,6 +797,7 @@
 Eric Roshan-Eisner <eric.d.eisner@gmail.com>
 Eric Rutherford <erutherford@gmail.com>
 Eric Rykwalder <e.rykwalder@gmail.com>
+Eric Wang <wangchaogo1990@gmail.com>
 Erick Tryzelaar <etryzelaar@google.com>
 Erik Aigner <aigner.erik@gmail.com>
 Erik Dubbelboer <erik@dubbelboer.com>
@@ -778,6 +809,7 @@
 Erwin Oegema <blablaechthema@hotmail.com>
 Esko Luontola <esko.luontola@gmail.com>
 Ethan Burns <eaburns@google.com>
+Ethan Hur <ethan0311@gmail.com>
 Ethan Miller <eamiller@us.ibm.com>
 Euan Kemp <euank@euank.com>
 Eugene Formanenko <mo4islona@gmail.com>
@@ -818,6 +850,7 @@
 Felix Geisendörfer <haimuiba@gmail.com>
 Felix Kollmann <fk@konsorten.de>
 Ferenc Szabo <frncmx@gmail.com>
+Fernandez Ludovic <lfernandez.dev@gmail.com>
 Filip Gruszczyński <gruszczy@gmail.com>
 Filip Haglund <drathier@users.noreply.github.com>
 Filip Stanis <fstanis@google.com>
@@ -858,6 +891,7 @@
 Gabriel Nicolas Avellaneda <avellaneda.gabriel@gmail.com>
 Gabriel Rosenhouse <rosenhouse@gmail.com>
 Gabriel Russell <gabriel.russell@gmail.com>
+Gabriel Vasile <gabriel.vasile0793@gmail.com>
 Gareth Paul Jones <gpj@foursquare.com>
 Garret Kelly <gdk@google.com>
 Garrick Evans <garrick@google.com>
@@ -891,6 +925,8 @@
 Gideon Jan-Wessel Redelinghuys <gjredelinghuys@gmail.com>
 Giles Lean <giles.lean@pobox.com>
 Giovanni Bajo <rasky@develer.com>
+GitHub User @180909 (70465953) <734461790@qq.com>
+GitHub User @6543 (24977596) <6543@obermui.de>
 GitHub User @aca (50316549) <acadx0@gmail.com>
 GitHub User @ajnirp (1688456) <ajnirp@users.noreply.github.com>
 GitHub User @ajz01 (4744634) <ajzdenek@gmail.com>
@@ -904,10 +940,12 @@
 GitHub User @cch123 (384546) <buaa.cch@gmail.com>
 GitHub User @chainhelen (7046329) <chainhelen@gmail.com>
 GitHub User @chanxuehong (3416908) <chanxuehong@gmail.com>
+GitHub User @Cluas (10056928) <Cluas@live.cn>
 GitHub User @cncal (23520240) <flycalvin@qq.com>
 GitHub User @DQNEO (188741) <dqneoo@gmail.com>
 GitHub User @Dreamacro (8615343) <chuainian@gmail.com>
 GitHub User @dupoxy (1143957) <dupoxy@users.noreply.github.com>
+GitHub User @EndlessCheng (7086966) <loli.con@qq.com>
 GitHub User @erifan (31343225) <eric.fang@arm.com>
 GitHub User @esell (9735165) <eujon.sellers@gmail.com>
 GitHub User @fatedier (7346661) <fatedier@gmail.com>
@@ -916,12 +954,15 @@
 GitHub User @GrigoriyMikhalkin (3637857) <grigoriymikhalkin@gmail.com>
 GitHub User @hengwu0 (41297446) <41297446+hengwu0@users.noreply.github.com>
 GitHub User @hitzhangjie (3725760) <hit.zhangjie@gmail.com>
+GitHub User @hqpko (13887251) <whaibin01@hotmail.com>
 GitHub User @itchyny (375258) <itchyny@hatena.ne.jp>
 GitHub User @jinmiaoluo (39730824) <jinmiaoluo@icloud.com>
 GitHub User @jopbrown (6345470) <msshane2008@gmail.com>
 GitHub User @kazyshr (30496953) <kazyshr0301@gmail.com>
 GitHub User @kc1212 (1093806) <kc1212@users.noreply.github.com>
+GitHub User @komisan19 (18901496) <komiyama6219@gmail.com>
 GitHub User @Kropekk (13366453) <kamilkropiewnicki@gmail.com>
+GitHub User @lhl2617 (33488131) <l.h.lee2617@gmail.com>
 GitHub User @linguohua (3434367) <lghchinaidea@gmail.com>
 GitHub User @LotusFenn (13775899) <fenn.lotus@gmail.com>
 GitHub User @ly303550688 (11519839) <yang.liu636@gmail.com>
@@ -936,10 +977,14 @@
 GitHub User @pityonline (438222) <pityonline@gmail.com>
 GitHub User @po3rin (29445112) <abctail30@gmail.com>
 GitHub User @pokutuna (57545) <popopopopokutuna@gmail.com>
+GitHub User @povsister (11040951) <pov@mahou-shoujo.moe>
 GitHub User @pytimer (17105586) <lixin20101023@gmail.com>
+GitHub User @qcrao (7698088) <qcrao91@gmail.com>
 GitHub User @ramenjuniti (32011829) <ramenjuniti@gmail.com>
 GitHub User @saitarunreddy (21041941) <saitarunreddypalla@gmail.com>
+GitHub User @SataQiu (9354727) <shidaqiu2018@gmail.com>
 GitHub User @shogo-ma (9860598) <Choroma194@gmail.com>
+GitHub User @sivchari (55221074) <shibuuuu5@gmail.com>
 GitHub User @skanehira (7888591) <sho19921005@gmail.com>
 GitHub User @soolaugust (10558124) <soolaugust@gmail.com>
 GitHub User @surechen (7249331) <surechen17@gmail.com>
@@ -947,9 +992,12 @@
 GitHub User @tell-k (26263) <ffk2005@gmail.com>
 GitHub User @tennashi (10219626) <tennashio@gmail.com>
 GitHub User @uhei (2116845) <uhei@users.noreply.github.com>
+GitHub User @uji (49834542) <ujiprog@gmail.com>
+GitHub User @unbyte (5772358) <i@shangyes.net>
 GitHub User @uropek (39370426) <uropek@gmail.com>
 GitHub User @utkarsh-extc (53217283) <utkarsh.extc@gmail.com>
 GitHub User @witchard (4994659) <witchard@hotmail.co.uk>
+GitHub User @wolf1996 (5901874) <ksgiv37@gmail.com>
 GitHub User @yah01 (12216890) <kagaminehuan@gmail.com>
 GitHub User @yuanhh (1298735) <yuan415030@gmail.com>
 GitHub User @zikaeroh (48577114) <zikaeroh@gmail.com>
@@ -962,6 +1010,7 @@
 Glenn Lewis <gmlewis@google.com>
 Gordon Klaus <gordon.klaus@gmail.com>
 Gordon Tyler <gordon@doxxx.net>
+Grace Han <hgrace503@gmail.com>
 Graham King <graham4king@gmail.com>
 Graham Miller <graham.miller@gmail.com>
 Grant Griffiths <ggp493@gmail.com>
@@ -977,10 +1026,12 @@
 Guilherme Garnier <guilherme.garnier@gmail.com>
 Guilherme Goncalves <guilhermeaugustosg@gmail.com>
 Guilherme Rezende <guilhermebr@gmail.com>
+Guilherme Souza <32180229+gqgs@users.noreply.github.com>
 Guillaume J. Charmes <guillaume@charmes.net>
 Guillaume Sottas <guillaumesottas@gmail.com>
 Günther Noack <gnoack@google.com>
 Guobiao Mei <meiguobiao@gmail.com>
+Guodong Li <guodongli@google.com>
 Guoliang Wang <iamwgliang@gmail.com>
 Gustav Paul <gustav.paul@gmail.com>
 Gustav Westling <gustav@westling.xyz>
@@ -995,6 +1046,7 @@
 Han-Wen Nienhuys <hanwen@google.com>
 Hang Qian <hangqian90@gmail.com>
 Hanjun Kim <hallazzang@gmail.com>
+Hanlin He <hanling.he@gmail.com>
 Hanlin Shi <shihanlin9@gmail.com>
 Haoran Luo <haoran.luo@chaitin.com>
 Haosdent Huang <haosdent@gmail.com>
@@ -1026,18 +1078,19 @@
 Heschi Kreinick <heschi@google.com>
 Hidetatsu Yaginuma <ygnmhdtt@gmail.com>
 Hilko Bengen <bengen@hilluzination.de>
+Himanshu Kishna Srivastava <28himanshu@gmail.com>
 Hiroaki Nakamura <hnakamur@gmail.com>
 Hiromichi Ema <ema.hiro@gmail.com>
 Hironao OTSUBO <motemen@gmail.com>
 Hiroshi Ioka <hirochachacha@gmail.com>
 Hitoshi Mitake <mitake.hitoshi@gmail.com>
 Holden Huang <ttyh061@gmail.com>
-Songlin Jiang <hollowman@hollowman.ml>
 Hong Ruiqi <hongruiqi@gmail.com>
 Hongfei Tan <feilengcui008@gmail.com>
 Horacio Duran <horacio.duran@gmail.com>
 Horst Rutter <hhrutter@gmail.com>
 Hossein Sheikh Attar <hattar@google.com>
+Hossein Zolfi <hossein.zolfi@gmail.com>
 Howard Zhang <howard.zhang@arm.com>
 Hsin Tsao <tsao@google.com>
 Hsin-Ho Yeh <yhh92u@gmail.com>
@@ -1054,11 +1107,14 @@
 Ian Kent <iankent85@gmail.com>
 Ian Lance Taylor <iant@golang.org>
 Ian Leue <ian@appboy.com>
+Ian Mckay <iann0036@gmail.com>
 Ian Tay <iantay@google.com>
+Ian Woolf <btw515wolf2@gmail.com>
 Ian Zapolsky <ianzapolsky@gmail.com>
 Ibrahim AshShohail <ibra.sho@gmail.com>
 Icarus Sparry <golang@icarus.freeuk.com>
 Iccha Sethi <icchasethi@gmail.com>
+Ichinose Shogo <shogo82148@gmail.com>
 Idora Shinatose <idora.shinatose@gmail.com>
 Ignacio Hagopian <jsign.uy@gmail.com>
 Igor Bernstein <igorbernstein@google.com>
@@ -1068,6 +1124,7 @@
 Igor Zhilianin <igor.zhilianin@gmail.com>
 Ikko Ashimine <eltociear@gmail.com>
 Illya Yalovyy <yalovoy@gmail.com>
+Ilya Chukov <56119080+Elias506@users.noreply.github.com>
 Ilya Sinelnikov <sidhmangh@gmail.com>
 Ilya Tocar <ilya.tocar@intel.com>
 INADA Naoki <songofacandy@gmail.com>
@@ -1122,6 +1179,7 @@
 James Craig Burley <james-github@burleyarch.com>
 James David Chalfant <james.chalfant@gmail.com>
 James Eady <jmeady@google.com>
+James Fennell <jpfennell@google.com>
 James Fysh <james.fysh@gmail.com>
 James Gray <james@james4k.com>
 James Hartig <fastest963@gmail.com>
@@ -1178,6 +1236,7 @@
 Javier Kohen <jkohen@google.com>
 Javier Revillas <jrevillas@massivedynamic.io>
 Javier Segura <javism@gmail.com>
+Jay Chen <chenjie@chenjie.info>
 Jay Conrod <jayconrod@google.com>
 Jay Lee <BusyJayLee@gmail.com>
 Jay Taylor <outtatime@gmail.com>
@@ -1200,6 +1259,7 @@
 Jeff R. Allen <jra@nella.org> <jeff.allen@gmail.com>
 Jeff Sickel <jas@corpus-callosum.com>
 Jeff Wendling <jeff@spacemonkey.com>
+Jeff Widman <jeff@jeffwidman.com>
 Jeffrey H <jeffreyh192@gmail.com>
 Jelte Fennema <github-tech@jeltef.nl>
 Jens Frederich <jfrederich@gmail.com>
@@ -1210,6 +1270,7 @@
 Jeremy Jackins <jeremyjackins@gmail.com>
 Jeremy Jay <jeremy@pbnjay.com>
 Jeremy Schlatter <jeremy.schlatter@gmail.com>
+Jero Bado <tokidokitalkyou@gmail.com>
 Jeroen Bobbeldijk <jerbob92@gmail.com>
 Jeroen Simonetti <jeroen@simonetti.nl>
 Jérôme Doucet <jerdct@gmail.com>
@@ -1251,6 +1312,8 @@
 Joe Shaw <joe@joeshaw.org>
 Joe Sylve <joe.sylve@gmail.com>
 Joe Tsai <joetsai@digital-static.net>
+Joel Courtney <euphemize@gmail.com>
+Joel Ferrier <joelferrier@google.com>
 Joel Sing <joel@sing.id.au> <jsing@google.com>
 Joël Stemmer <jstemmer@google.com>
 Joel Stemmer <stemmertech@gmail.com>
@@ -1260,7 +1323,9 @@
 Johan Jansson <johan.jansson@iki.fi>
 Johan Knutzen <johan@senri.se>
 Johan Sageryd <j@1616.se>
+Johannes Huning <johannes.huning@gmail.com>
 John Asmuth <jasmuth@gmail.com>
+John Bampton <jbampton@gmail.com>
 John Beisley <huin@google.com>
 John C Barstow <jbowtie@amathaine.com>
 John DeNero <denero@google.com>
@@ -1269,6 +1334,7 @@
 John Gilik <john@jgilik.com>
 John Graham-Cumming <jgc@jgc.org> <jgrahamc@gmail.com>
 John Howard Palevich <jack.palevich@gmail.com>
+John Jago <johnjago@protonmail.com>
 John Jeffery <jjeffery@sp.com.au>
 John Jenkins <twodopeshaggy@gmail.com>
 John Leidegren <john.leidegren@gmail.com>
@@ -1320,6 +1386,7 @@
 Jose Luis Vázquez González <josvazg@gmail.com>
 Joseph Bonneau <jcb@google.com>
 Joseph Holsten <joseph@josephholsten.com>
+Joseph Morag <sefim96@gmail.com>
 Josh Baum <joshbaum@google.com>
 Josh Bleecher Snyder <josharian@gmail.com>
 Josh Chorlton <jchorlton@gmail.com>
@@ -1327,12 +1394,14 @@
 Josh Goebel <dreamer3@gmail.com>
 Josh Hoak <jhoak@google.com>
 Josh Holland <jrh@joshh.co.uk>
+Josh Rickmar <jrick@companyzero.com>
 Josh Roppo <joshroppo@gmail.com>
 Josh Varga <josh.varga@gmail.com>
 Joshua Bezaleel Abednego <joshua.bezaleel@gmail.com>
 Joshua Boelter <joshua.boelter@intel.com>
 Joshua Chase <jcjoshuachase@gmail.com>
 Joshua Crowgey <jcrowgey@uw.edu>
+Joshua Harshman <joshgreyhat@gmail.com>
 Joshua M. Clulow <josh.clulow@joyent.com>
 Joshua Rubin <joshua@rubixconsulting.com>
 Josselin Costanzi <josselin@costanzi.fr>
@@ -1353,6 +1422,7 @@
 Julien Kauffmann <julien.kauffmann@freelan.org>
 Julien Salleyron <julien.salleyron@gmail.com>
 Julien Schmidt <google@julienschmidt.com>
+Julien Tant <julien@craftyx.fr>
 Julio Montes <julio.montes@intel.com>
 Jun Zhang <jim.zoumo@gmail.com>
 Junchen Li <junchen.li@arm.com>
@@ -1419,10 +1489,12 @@
 Kerollos Magdy <kerolloz@yahoo.com>
 Ketan Parmar <ketanbparmar@gmail.com>
 Kevan Swanberg <kevswanberg@gmail.com>
+Kevin Albertson <kevin.albertson@mongodb.com>
 Kevin Ballard <kevin@sb.org>
 Kevin Burke <kev@inburke.com>
 Kévin Dunglas <dunglas@gmail.com>
 Kevin Gillette <extemporalgenome@gmail.com>
+Kevin Herro <kevin109104@gmail.com>
 Kevin Kirsche <kev.kirsche@gmail.com>
 Kevin Klues <klueska@gmail.com> <klueska@google.com>
 Kevin Malachowski <chowski@google.com>
@@ -1457,6 +1529,7 @@
 Kris Kwiatkowski <kris@cloudflare.com>
 Kris Nova <kris@nivenly.com>
 Kris Rousey <krousey@google.com>
+Krishna Birla <krishnabirla16@gmail.com>
 Kristopher Watts <traetox@gmail.com>
 Krzysztof Dąbrowski <krzysdabro@live.com>
 Kshitij Saraogi <kshitijsaraogi@gmail.com>
@@ -1480,6 +1553,7 @@
 Lakshay Garg <lakshay.garg.1996@gmail.com>
 Lann Martin <lannm@google.com>
 Lanre Adelowo <yo@lanre.wtf>
+Lapo Luchini <lapo@lapo.it>
 Larry Clapp <larry@theclapp.org>
 Larry Hosken <lahosken@golang.org>
 Lars Jeppesen <jeppesen.lars@gmail.com>
@@ -1496,6 +1570,7 @@
 Leo Antunes <leo@costela.net>
 Leo Rudberg <ljr@google.com>
 Leon Klingele <git@leonklingele.de>
+Leonard Wang <wangdeyu0907@gmail.com>
 Leonardo Comelli <leonardo.comelli@gmail.com>
 Leonel Quinteros <leonel.quinteros@gmail.com>
 Lev Shamardin <shamardin@gmail.com>
@@ -1506,7 +1581,9 @@
 Lingchao Xin <douglarek@gmail.com>
 Lion Yang <lion@aosc.xyz>
 Liz Rice <liz@lizrice.com>
+Lize Cai <lizzzcai1@gmail.com>
 Lloyd Dewolf <foolswisdom@gmail.com>
+Lluís Batlle i Rossell <viric@viric.name>
 Lorenz Bauer <lmb@cloudflare.com>
 Lorenz Brun <lorenz@brun.one>
 Lorenz Nickel <mail@lorenznickel.de>
@@ -1531,6 +1608,7 @@
 Luke Champine <luke.champine@gmail.com>
 Luke Curley <qpingu@gmail.com>
 Luke Granger-Brown <git@lukegb.com>
+Luke Shumaker <lukeshu@datawire.io>
 Luke Young <bored-engineer@users.noreply.github.com>
 Luna Duclos <luna.duclos@palmstonegames.com>
 Luuk van Dijk <lvd@golang.org> <lvd@google.com>
@@ -1550,6 +1628,7 @@
 Manfred Touron <m@42.am>
 Manigandan Dharmalingam <manigandan.jeff@gmail.com>
 Manish Goregaokar <manishsmail@gmail.com>
+Manlio Perillo <manlio.perillo@gmail.com>
 Manoj Dayaram <platform-dev@moovweb.com> <manoj.dayaram@moovweb.com>
 Mansour Rahimi <rahimi.mnr@gmail.com>
 Manu Garg <manugarg@google.com>
@@ -1646,6 +1725,8 @@
 Matt Jones <mrjones@google.com>
 Matt Juran <thepciet@gmail.com>
 Matt Layher <mdlayher@gmail.com>
+Matt Masurka <masurka@google.com>
+Matt Pearring <broskies@google.com>
 Matt Reiferson <mreiferson@gmail.com>
 Matt Robenolt <matt@ydekproductions.com>
 Matt Strong <mstrong1341@gmail.com>
@@ -1659,9 +1740,12 @@
 Matthew Holt <Matthew.Holt+git@gmail.com>
 Matthew Horsnell <matthew.horsnell@gmail.com>
 Matthew Waters <mwwaters@gmail.com>
+Matthias Frei <matthias.frei@inf.ethz.ch>
 Matthieu Hauglustaine <matt.hauglustaine@gmail.com>
 Matthieu Olivier <olivier.matthieu@gmail.com>
 Matthijs Kooijman <matthijs@stdin.nl>
+Mattias Appelgren <mattias@ppelgren.se>
+Mauricio Alvarado <mauricio.alvarado@leftfieldlabs.com>
 Max Drosdo.www <g1ran1q@gmail.com>
 Max Riveiro <kavu13@gmail.com>
 Max Schmitt <max@schmitt.mx>
@@ -1677,9 +1761,11 @@
 Maxwell Krohn <themax@gmail.com>
 Maya Rashish <maya@NetBSD.org>
 Mayank Kumar <krmayankk@gmail.com>
+Mehrad Sadeghi <2012.linkinpark@gmail.com>
 Meir Fischer <meirfischer@gmail.com>
 Meng Zhuo <mengzhuo1203@gmail.com> <mzh@golangcn.org>
 Mhd Sulhan <m.shulhan@gmail.com>
+Mia Zhu <CrystalZhu1025getu@gmail.com>
 Micah Stetson <micah.stetson@gmail.com>
 Michael Anthony Knyszek <mknyszek@google.com>
 Michael Brandenburg <mbrandenburg@bolste.com>
@@ -1730,8 +1816,10 @@
 Michał Łowicki <mlowicki@gmail.com>
 Michal Pristas <michal.pristas@gmail.com>
 Michal Rostecki <mrostecki@suse.de>
+Michal Stokluska <mstoklus@redhat.com>
 Michalis Kargakis <michaliskargakis@gmail.com>
 Michel Lespinasse <walken@google.com>
+Michel Levieux <mlevieux42@gmail.com>
 Michele Di Pede <michele.di.pede@gmail.com>
 Mickael Kerjean <mickael.kerjean@gmail.com>
 Mickey Reiss <mickeyreiss@gmail.com>
@@ -1790,7 +1878,9 @@
 Mukesh Sharma <sharma.mukesh439@gmail.com>
 Mura Li <mura_li@castech.com.tw>
 Mykhailo Lesyk <mikhail@lesyk.org>
+Nahum Shalman <nahamu@gmail.com>
 Naman Aggarwal <aggarwal.nam@gmail.com>
+Naman Gera <namangera15@gmail.com>
 Nan Deng <monnand@gmail.com>
 Nao Yonashiro <owan.orisano@gmail.com>
 Naoki Kanatani <k12naoki@gmail.com>
@@ -1818,6 +1908,7 @@
 Nevins Bartolomeo <nevins.bartolomeo@gmail.com>
 Niall Sheridan <nsheridan@gmail.com>
 Nic Day <nic.day@me.com>
+Nicholas Asimov <nicholas@asimov.me>
 Nicholas Katsaros <nick@nickkatsaros.com>
 Nicholas Maniscalco <nicholas@maniscalco.com>
 Nicholas Ng <nickng@nickng.io>
@@ -1847,6 +1938,7 @@
 Nikhil Benesch <nikhil.benesch@gmail.com>
 Nikita Gillmann <nikita@n0.is> <ng0@n0.is>
 Nikita Kryuchkov <nkryuchkov10@gmail.com>
+Nikita Melekhin <nimelehin@gmail.com>
 Nikita Vanyasin <nikita.vanyasin@gmail.com>
 Niklas Schnelle <niklas.schnelle@gmail.com>
 Niko Dziemba <niko@dziemba.com>
@@ -1858,6 +1950,7 @@
 Nishanth Shanmugham <nishanth.gerrard@gmail.com>
 Noah Campbell <noahcampbell@gmail.com>
 Noah Goldman <noahg34@gmail.com>
+Noah Santschi-Cooney <noah@santschi-cooney.ch>
 Noble Johnson <noblepoly@gmail.com>
 Nodir Turakulov <nodir@google.com>
 Noel Georgi <git@frezbo.com>
@@ -1894,6 +1987,7 @@
 Pablo Santiago Blum de Aguiar <scorphus@gmail.com>
 Padraig Kitterick <padraigkitterick@gmail.com>
 Pallat Anchaleechamaikorn <yod.pallat@gmail.com>
+Pan Chenglong <1004907659@qq.com>
 Panos Georgiadis <pgeorgiadis@suse.de>
 Pantelis Sampaziotis <psampaz@gmail.com>
 Paolo Giarrusso <p.giarrusso@gmail.com>
@@ -1947,6 +2041,7 @@
 Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>
 Paulo Gomes <paulo.gomes.uk@gmail.com>
 Pavel Paulau <pavel.paulau@gmail.com>
+Pavel Watson <watsonpavel@gmail.com>
 Pavel Zinovkin <pavel.zinovkin@gmail.com>
 Pavlo Sumkin <ymkins@gmail.com>
 Pawel Knap <pawelknap88@gmail.com>
@@ -1954,6 +2049,8 @@
 Paweł Szulik <pawel.szulik@intel.com>
 Pei Xian Chee <luciolas1991@gmail.com>
 Pei-Ming Wu <p408865@gmail.com>
+Pen Tree <appletree2479@outlook.com>
+Peng Gao <peng.gao.dut@gmail.com>
 Percy Wegmann <ox.to.a.cart@gmail.com>
 Perry Abbott <perry.j.abbott@gmail.com>
 Petar Dambovaliev <petar.atanasov.1987@gmail.com>
@@ -1992,6 +2089,7 @@
 Philip Hofer <phofer@umich.edu>
 Philip K. Warren <pkwarren@gmail.com>
 Philip Nelson <me@pnelson.ca>
+Philipp Sauter <sauterp@protonmail.com>
 Philipp Stephani <phst@google.com>
 Phillip Campbell <15082+phillc@users.noreply.github.com>
 Pierre Carru <pierre.carru@eshard.com>
@@ -2007,6 +2105,7 @@
 Polina Osadcha <polliosa@google.com>
 Pontus Leitzler <leitzler@gmail.com>
 Povilas Versockas <p.versockas@gmail.com>
+Prajwal Koirala <16564273+Prajwal-Koirala@users.noreply.github.com>
 Prasanga Siripala <pj@pjebs.com.au>
 Prasanna Swaminathan <prasanna@mediamath.com>
 Prashant Agrawal <prashant.a.vjti@gmail.com>
@@ -2027,11 +2126,13 @@
 Quinn Slack <sqs@sourcegraph.com>
 Quinten Yearsley <qyearsley@chromium.org>
 Quoc-Viet Nguyen <afelion@gmail.com>
+Rabin Gaire <rabingaire20@gmail.com>
 Radek Simko <radek.simko@gmail.com>
 Radek Sohlich <sohlich@gmail.com>
 Radu Berinde <radu@cockroachlabs.com>
 Rafal Jeczalik <rjeczalik@gmail.com>
 Raghavendra Nagaraj <jamdagni86@gmail.com>
+Rahul Bajaj <rahulrb0509@gmail.com>
 Rahul Chaudhry <rahulchaudhry@chromium.org>
 Rahul Wadhwani <rahulwadhwani21@gmail.com>
 Raif S. Naffah <go@naffah-raif.name>
@@ -2041,12 +2142,14 @@
 Ralph Corderoy <ralph@inputplus.co.uk>
 Ramazan AYYILDIZ <rayyildiz@gmail.com>
 Ramesh Dharan <dharan@google.com>
+Randy Reddig <randy@alta.software>
 Raph Levien <raph@google.com>
 Raphael Geronimi <raphael.geronimi@gmail.com>
 Raul Silvera <rsilvera@google.com>
 Ravil Bikbulatov <weeellz12@gmail.com>
 RaviTeja Pothana <ravi.tezu@gmail.com>
 Ray Tung <rtung@thoughtworks.com>
+Ray Wu <ray@liftoff.io>
 Raymond Kazlauskas <raima220@gmail.com>
 Rebecca Stambler <rstambler@golang.org>
 Reilly Watson <reillywatson@gmail.com>
@@ -2066,6 +2169,7 @@
 Richard Gibson <richard.gibson@gmail.com>
 Richard Miller <miller.research@gmail.com>
 Richard Musiol <mail@richard-musiol.de> <neelance@gmail.com>
+Richard Pickering <richard.pickering@hotmail.co.uk>
 Richard Ulmer <codesoap@mailbox.org>
 Richard Wilkes <wilkes@me.com>
 Rick Arnold <rickarnoldjr@gmail.com>
@@ -2124,6 +2228,7 @@
 Rudi Kramer <rudi.kramer@gmail.com>
 Rui Ueyama <ruiu@google.com>
 Ruixin Bao <ruixin.bao@ibm.com>
+Ruslan Andreev <ruslan.andreev@huawei.com>
 Ruslan Nigmatullin <elessar@dropbox.com>
 Russ Cox <rsc@golang.org>
 Russell Haering <russellhaering@gmail.com>
@@ -2141,6 +2246,7 @@
 Ryan Slade <ryanslade@gmail.com>
 Ryan Zhang <ryan.zhang@docker.com>
 Ryoichi KATO <ryo1kato@gmail.com>
+Ryoya Sekino <ryoyasekino1993@gmail.com>
 Ryuji Iwata <qt.luigi@gmail.com>
 Ryuma Yoshida <ryuma.y1117@gmail.com>
 Ryuzo Yamamoto <ryuzo.yamamoto@gmail.com>
@@ -2176,8 +2282,10 @@
 Sascha Brawer <sascha@brawer.ch>
 Sasha Lionheart <lionhearts@google.com>
 Sasha Sobol <sasha@scaledinference.com>
+Satoru Kitaguchi <rule.the.fate.myfirststory@gmail.com>
 Scott Barron <scott.barron@github.com>
 Scott Bell <scott@sctsm.com>
+Scott Cotton <scott@mindowl.com>
 Scott Crunkleton <crunk1@gmail.com>
 Scott Ferguson <scottwferg@gmail.com>
 Scott Lawrence <bytbox@gmail.com>
@@ -2191,6 +2299,7 @@
 Sean Christopherson <sean.j.christopherson@intel.com>
 Sean Dolphin <Sean.Dolphin@kpcompass.com>
 Sean Harger <sharger@google.com>
+Sean Harrington <sean.harrington@leftfieldlabs.com>
 Sean Hildebrand <seanwhildebrand@gmail.com>
 Sean Liao <seankhliao@gmail.com>
 Sean Rees <sean@erifax.org>
@@ -2212,6 +2321,7 @@
 Sergey Frolov <sfrolov@google.com>
 Sergey Glushchenko <gsserge@gmail.com>
 Sergey Ivanov <ser1325@gmail.com>
+Sergey Kacheev <S.Kacheev@gmail.com>
 Sergey Lukjanov <me@slukjanov.name>
 Sergey Mishin <sergeymishine@gmail.com>
 Sergey Mudrik <sergey.mudrik@gmail.com>
@@ -2223,6 +2333,7 @@
 Serhii Aheienko <serhii.aheienko@gmail.com>
 Seth Hoenig <seth.a.hoenig@gmail.com>
 Seth Vargo <sethvargo@gmail.com>
+Shaba Abhiram <shabarivas.abhiram@gmail.com>
 Shahar Kohanim <skohanim@gmail.com>
 Shailesh Suryawanshi <ss.shailesh28@gmail.com>
 Shamil Garatuev <garatuev@gmail.com>
@@ -2250,9 +2361,13 @@
 Shivani Singhal <shivani.singhal2804@gmail.com>
 Shivansh Rai <shivansh@freebsd.org>
 Shivashis Padhi <shivashispadhi@gmail.com>
+Shoshin Nikita <shoshin_nikita@fastmail.com>
+Shota Sugiura <s.shota.710.3506@gmail.com>
 Shubham Sharma <shubham.sha12@gmail.com>
+Shuhei Takahashi <nya@chromium.org>
 Shun Fan <sfan@google.com>
 Silvan Jegen <s.jegen@gmail.com>
+Simão Gomes Viana <simaogmv@gmail.com>
 Simarpreet Singh <simar@linux.com>
 Simon Drake <simondrake1990@gmail.com>
 Simon Ferquel <simon.ferquel@docker.com>
@@ -2267,13 +2382,16 @@
 Sjoerd Siebinga <sjoerd.siebinga@gmail.com>
 Sokolov Yura <funny.falcon@gmail.com>
 Song Gao <song@gao.io>
+Song Lim <songlim327@gmail.com>
 Songjiayang <songjiayang1@gmail.com>
+Songlin Jiang <hollowman@hollowman.ml>
 Soojin Nam <jsunam@gmail.com>
 Søren L. Hansen <soren@linux2go.dk>
 Sparrow Li <liyuancylx@gmail.com>
 Spencer Kocot <spencerkocot@gmail.com>
 Spencer Nelson <s@spenczar.com>
 Spencer Tung <spencertung@google.com>
+Spenser Black <spenserblack01@gmail.com>
 Spring Mc <heresy.mc@gmail.com>
 Srdjan Petrovic <spetrovic@google.com>
 Sridhar Venkatakrishnan <sridhar@laddoo.net>
@@ -2324,6 +2442,7 @@
 Suzy Mueller <suzmue@golang.org>
 Sven Almgren <sven@tras.se>
 Sven Blumenstein <svbl@google.com>
+Sven Lee <lee1300394324@gmail.com>
 Sven Taute <sven.taute@gmail.com>
 Sylvain Zimmer <sylvain@sylvainzimmer.com>
 Syohei YOSHIDA <syohex@gmail.com>
@@ -2406,12 +2525,14 @@
 Tobias Assarsson <tobias.assarsson@gmail.com>
 Tobias Columbus <tobias.columbus@gmail.com> <tobias.columbus@googlemail.com>
 Tobias Klauser <tklauser@distanz.ch>
+Tobias Kohlbau <tobias@kohlbau.de>
 Toby Burress <kurin@google.com>
 Todd Kulesza <tkulesza@google.com>
 Todd Neal <todd@tneal.org>
 Todd Wang <toddwang@gmail.com>
 Tom Anthony <git@tomanthony.co.uk>
 Tom Bergan <tombergan@google.com>
+Tom Freudenberg <tom.freudenberg@4commerce.de>
 Tom Heng <zhm20070928@gmail.com>
 Tom Lanyon <tomlanyon@google.com>
 Tom Levy <tomlevy93@gmail.com>
@@ -2440,6 +2561,7 @@
 Totoro W <tw19881113@gmail.com>
 Travis Bischel <travis.bischel@gmail.com>
 Travis Cline <travis.cline@gmail.com>
+Trevor Dixon <trevordixon@gmail.com>
 Trevor Strohman <trevor.strohman@gmail.com>
 Trey Lawrence <lawrence.trey@gmail.com>
 Trey Roessig <trey.roessig@gmail.com>
@@ -2463,6 +2585,7 @@
 Tzu-Chiao Yeh <su3g4284zo6y7@gmail.com>
 Tzu-Jung Lee <roylee17@currant.com>
 Udalov Max <re.udalov@gmail.com>
+Uddeshya Singh <singhuddeshyaofficial@gmail.com>
 Ugorji Nwoke <ugorji@gmail.com>
 Ulf Holm Nielsen <doktor@dyregod.dk>
 Ulrich Kunitz <uli.kunitz@gmail.com>
@@ -2475,6 +2598,7 @@
 Vadim Vygonets <unixdj@gmail.com>
 Val Polouchkine <vpolouch@justin.tv>
 Valentin Vidic <vvidic@valentin-vidic.from.hr>
+Vaughn Iverson <vsivsi@yahoo.com>
 Vee Zhang <veezhang@126.com> <vveezhang@gmail.com>
 Vega Garcia Luis Alfonso <vegacom@gmail.com>
 Venil Noronha <veniln@vmware.com>
@@ -2491,6 +2615,7 @@
 Vincent Vanackere <vincent.vanackere@gmail.com>
 Vinu Rajashekhar <vinutheraj@gmail.com>
 Vish Subramanian <vish@google.com>
+Vishal Dalwadi <dalwadivishal26@gmail.com>
 Vishvananda Ishaya <vishvananda@gmail.com>
 Visweswara R <r.visweswara@gmail.com>
 Vitaly Zdanevich <zdanevich.vitaly@ya.ru>
@@ -2542,6 +2667,7 @@
 William Chan <willchan@chromium.org>
 William Chang <mr.williamchang@gmail.com>
 William Josephson <wjosephson@gmail.com>
+William Langford <wlangfor@gmail.com>
 William Orr <will@worrbase.com> <ay1244@gmail.com>
 William Poussier <william.poussier@gmail.com>
 Wisdom Omuya <deafgoat@gmail.com>
@@ -2550,6 +2676,7 @@
 Xia Bin <snyh@snyh.org>
 Xiangdong Ji <xiangdong.ji@arm.com>
 Xiaodong Liu <teaofmoli@gmail.com>
+Xing Gao <18340825824@163.com>
 Xing Xing <mikespook@gmail.com>
 Xingqang Bai <bxq2011hust@qq.com>
 Xu Fei <badgangkiller@gmail.com>
@@ -2571,6 +2698,7 @@
 Yasser Abdolmaleki <yasser@yasser.ca>
 Yasuharu Goto <matope.ono@gmail.com>
 Yasuhiro Matsumoto <mattn.jp@gmail.com>
+Yasutaka Shinzaki <shinzaki@yasu26.tech>
 Yasuyuki Oka <yasuyk@gmail.com>
 Yazen Shunnar <yazen.shunnar@gmail.com>
 Yestin Sun <ylh@pdx.edu>
@@ -2583,14 +2711,18 @@
 Yoshiyuki Kanno <nekotaroh@gmail.com> <yoshiyuki.kanno@stoic.co.jp>
 Yoshiyuki Mineo <yoshiyuki.mineo@gmail.com>
 Yosuke Akatsuka <yosuke.akatsuka@gmail.com>
+Youfu Zhang <zhangyoufu@gmail.com>
 Yu Heng Zhang <annita.zhang@cn.ibm.com>
 Yu Xuan Zhang <zyxsh@cn.ibm.com>
+Yu, Li-Yu <afg984@gmail.com>
 Yuichi Kishimoto <yk2220s@gmail.com>
 Yuichi Nishiwaki <yuichi.nishiwaki@gmail.com>
 Yuji Yaginuma <yuuji.yaginuma@gmail.com>
+Yuki Ito <mrno110y@gmail.com>
 Yuki OKUSHI <huyuumi.dev@gmail.com>
 Yuki Yugui Sonoda <yugui@google.com>
 Yukihiro Nishinaka <6elpinal@gmail.com>
+YunQiang Su <syq@debian.org>
 Yury Smolsky <yury@smolsky.by>
 Yusuke Kagiwada <block.rxckin.beats@gmail.com>
 Yuusei Kuwana <kuwana@kumama.org>
@@ -2599,6 +2731,7 @@
 Zac Bergquist <zbergquist99@gmail.com>
 Zach Bintliff <zbintliff@gmail.com>
 Zach Gershman <zachgersh@gmail.com>
+Zach Hoffman <zrhoffman@apache.org>
 Zach Jones <zachj1@gmail.com>
 Zachary Amsden <zach@thundertoken.com>
 Zachary Gershman <zgershman@pivotal.io>
@@ -2617,6 +2750,7 @@
 Ziad Hatahet <hatahet@gmail.com>
 Ziheng Liu <lzhfromustc@gmail.com>
 Zorion Arrizabalaga <zorionk@gmail.com>
+Zvonimir Pavlinovic <zpavlinovic@google.com>
 Zyad A. Ali <zyad.ali.me@gmail.com>
 Максадбек Ахмедов <a.maksadbek@gmail.com>
 Максим Федосеев <max.faceless.frei@gmail.com>
diff --git a/VERSION b/VERSION
index cc14961..dd23292 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-go1.17rc1
\ No newline at end of file
+go1.17
\ No newline at end of file
diff --git a/api/go1.17.txt b/api/go1.17.txt
index 3d0a464..4850538 100644
--- a/api/go1.17.txt
+++ b/api/go1.17.txt
@@ -80,6 +80,7 @@
 pkg reflect, func VisibleFields(Type) []StructField
 pkg reflect, method (Method) IsExported() bool
 pkg reflect, method (StructField) IsExported() bool
+pkg reflect, method (Value) CanConvert(Type) bool
 pkg runtime/cgo (darwin-amd64-cgo), func NewHandle(interface{}) Handle
 pkg runtime/cgo (darwin-amd64-cgo), method (Handle) Delete()
 pkg runtime/cgo (darwin-amd64-cgo), method (Handle) Value() interface{}
diff --git a/codereview.cfg b/codereview.cfg
index 77a74f1..9d5ebe8 100644
--- a/codereview.cfg
+++ b/codereview.cfg
@@ -1 +1,2 @@
-branch: master
+branch: release-branch.go1.17
+parent-branch: master
diff --git a/doc/asm.html b/doc/asm.html
index d578800..51f85eb 100644
--- a/doc/asm.html
+++ b/doc/asm.html
@@ -166,7 +166,7 @@
 </li>
 
 <li>
-<code>SP</code>: Stack pointer: top of stack.
+<code>SP</code>: Stack pointer: the highest address within the local stack frame.
 </li>
 
 </ul>
@@ -216,7 +216,7 @@
 The <code>SP</code> pseudo-register is a virtual stack pointer
 used to refer to frame-local variables and the arguments being
 prepared for function calls.
-It points to the top of the local stack frame, so references should use negative offsets
+It points to the highest address within the local stack frame, so references should use negative offsets
 in the range [−framesize, 0):
 <code>x-8(SP)</code>, <code>y-4(SP)</code>, and so on.
 </p>
@@ -409,7 +409,7 @@
 (For <code>TEXT</code> items.)
 Don't insert the preamble to check if the stack must be split.
 The frame for the routine, plus anything it calls, must fit in the
-spare space at the top of the stack segment.
+spare space remaining in the current stack segment.
 Used to protect routines such as the stack splitting code itself.
 </li>
 <li>
@@ -460,7 +460,7 @@
 <code>TOPFRAME</code> = 2048
 <br>
 (For <code>TEXT</code> items.)
-Function is the top of the call stack. Traceback should stop at this function.
+Function is the outermost frame of the call stack. Traceback should stop at this function.
 </li>
 </ul>
 
diff --git a/doc/go1.17.html b/doc/go1.17.html
index fa8f14d..c1b5ab3 100644
--- a/doc/go1.17.html
+++ b/doc/go1.17.html
@@ -14,13 +14,13 @@
   main ul li { margin: 0.5em 0; }
 </style>
 
-<h2 id="introduction">DRAFT RELEASE NOTES — Introduction to Go 1.17</h2>
+<h2 id="introduction">Introduction to Go 1.17</h2>
 
 <p>
-  <strong>
-    Go 1.17 is not yet released. These are work-in-progress
-    release notes. Go 1.17 is expected to be released in August 2021.
-  </strong>
+  The latest Go release, version 1.17, arrives six months after <a href="/doc/go1.16">Go 1.16</a>.
+  Most of its changes are in the implementation of the toolchain, runtime, and libraries.
+  As always, the release maintains the Go 1 <a href="/doc/go1compat">promise of compatibility</a>.
+  We expect almost all Go programs to continue to compile and run as before.
 </p>
 
 <h2 id="language">Changes to the language</h2>
@@ -119,39 +119,69 @@
   stack frame pointers only on Linux, macOS, and iOS.
 </p>
 
+<h3 id="loong64">loong64 GOARCH value reserved</h3>
+
+<p><!-- CL 333909 -->
+  The main Go compiler does not yet support the LoongArch
+  architecture, but we've reserved the <code>GOARCH</code> value
+  "<code>loong64</code>".
+  This means that Go files named <code>*_loong64.go</code> will now
+  be <a href="/pkg/go/build/#hdr-Build_Constraints">ignored by Go
+  tools</a> except when that GOARCH value is being used.
+</p>
+
 <h2 id="tools">Tools</h2>
 
 <h3 id="go-command">Go command</h3>
 
-<h4 id="lazy-loading">Lazy module loading</h4>
+<a id="lazy-loading"><!-- for existing links only --></a>
+<h4 id="graph-pruning">Pruned module graphs in <code>go 1.17</code> modules</h4>
 
 <p><!-- golang.org/issue/36460 -->
+  If a module specifies <code>go</code> <code>1.17</code> or higher, the module
+  graph includes only the <em>immediate</em> dependencies of
+  other <code>go</code> <code>1.17</code> modules, not their full transitive
+  dependencies. (See <a href="/ref/mod#graph-pruning">Module graph pruning</a>
+  for more detail.)
+</p>
+
+<p>
+  For the <code>go</code> command to correctly resolve transitive imports using
+  the pruned module graph, the <code>go.mod</code> file for each module needs to
+  include more detail about the transitive dependencies relevant to that module.
   If a module specifies <code>go</code> <code>1.17</code> or higher in its
-  <code>go.mod</code> file, its transitive requirements are now loaded lazily,
-  avoiding the need to download or read <code>go.mod</code> files for
-  otherwise-irrelevant dependencies. To support lazy loading, in Go 1.17 modules
-  the <code>go</code> command maintains <em>explicit</em> requirements in
-  the <code>go.mod</code> file for every dependency that provides any package
-  transitively imported by any package or test within the module.
-  See <a href="https://golang.org/design/36460-lazy-module-loading">the design
-  document</a> for more detail.
-  <!-- TODO(bcmills): replace the design-doc link with proper documentation. -->
+  <code>go.mod</code> file, its <code>go.mod</code> file now contains an
+  explicit <a href="/ref/mod#go-mod-file-require"><code>require</code>
+  directive</a> for every module that provides a transitively-imported package.
+  (In previous versions, the <code>go.mod</code> file typically only included
+  explicit requirements for <em>directly</em>-imported packages.)
+<p>
+
+<p>
+  Since the expanded <code>go.mod</code> file needed for module graph pruning
+  includes all of the dependencies needed to load the imports of any package in
+  the main module, if the main module specifies
+  <code>go</code> <code>1.17</code> or higher the <code>go</code> tool no longer
+  reads (or even downloads) <code>go.mod</code> files for dependencies if they
+  are not needed in order to complete the requested command.
+  (See <a href="/ref/mod#lazy-loading">Lazy loading</a>.)
 </p>
 
 <p><!-- golang.org/issue/45965 -->
-  Because the number of additional explicit requirements in the go.mod file may
-  be substantial, in a Go 1.17 module the newly-added requirements
-  on <em>indirect</em> dependencies are maintained in a
-  separate <code>require</code> block from the block containing direct
-  dependencies.
+  Because the number of explicit requirements may be substantially larger in an
+  expanded Go 1.17 <code>go.mod</code> file, the newly-added requirements
+  on <em>indirect</em> dependencies in a <code>go</code> <code>1.17</code>
+  module are maintained in a separate <code>require</code> block from the block
+  containing direct dependencies.
 </p>
 
 <p><!-- golang.org/issue/45094 -->
-  To facilitate the upgrade to lazy loading, the
-  <code>go</code> <code>mod</code> <code>tidy</code> subcommand now supports
-  a <code>-go</code> flag to set or change the <code>go</code> version in
-  the <code>go.mod</code> file. To enable lazy loading for an existing module
-  without changing the selected versions of its dependencies, run:
+  To facilitate the upgrade to Go 1.17 pruned module graphs, the
+  <a href="/ref/mod#go-mod-tidy"><code>go</code> <code>mod</code> <code>tidy</code></a>
+  subcommand now supports a <code>-go</code> flag to set or change
+  the <code>go</code> version in the <code>go.mod</code> file. To convert
+  the <code>go.mod</code> file for an existing module to Go 1.17 without
+  changing the selected versions of its dependencies, run:
 </p>
 
 <pre>
@@ -188,10 +218,10 @@
 </p>
 
 <p><!-- golang.org/issue/46366 -->
-  The <code>go</code> <code>mod</code> <code>graph</code> subcommand also
-  supports the <code>-go</code> flag, which causes it to report the graph as
-  seen by the indicated Go version, showing dependencies that may otherwise be
-  pruned out by lazy loading.
+  The <a href="/ref/mod#go-mod-graph"><code>go</code> <code>mod</code> <code>graph</code></a>
+  subcommand also supports the <code>-go</code> flag, which causes it to report
+  the graph as seen by the indicated Go version, showing dependencies that may
+  otherwise be pruned out.
 </p>
 
 <h4 id="module-deprecation-comments">Module deprecation comments</h4>
@@ -259,7 +289,8 @@
 
 <p><!-- golang.org/issue/36876 -->
   If the main module specifies <code>go</code> <code>1.17</code> or higher,
-  <code>go</code> <code>mod</code> <code>vendor</code> now annotates
+  <a href="/ref/mod#go-mod-vendor"><code>go</code> <code>mod</code> <code>vendor</code></a>
+  now annotates
   <code>vendor/modules.txt</code> with the <code>go</code> version indicated by
   each vendored module in its own <code>go.mod</code> file. The annotated
   version is used when building the module's packages from vendored source code.
@@ -457,6 +488,15 @@
   and compare functions by code pointer.
 </p>
 
+<h3 id="link">Linker</h3>
+
+<p><!-- CL 310349 -->
+  When the linker uses external linking mode, which is the default
+  when linking a program that uses cgo, and the linker is invoked
+  with a <code>-I</code> option, the option will now be passed to the
+  external linker as a <code>-Wl,--dynamic-linker</code> option.
+</p>
+
 <h2 id="library">Core library</h2>
 
 <h3 id="runtime/cgo"><a href="/pkg/runtime/cgo">Cgo</a></h3>
@@ -713,9 +753,9 @@
 
     <p><!-- CL 311572 -->
       The new
-      <a href="/pkg/database/sql/#NullInt16"><code>NullInt16</code></a> 
-      and 
-      <a href="/pkg/database/sql/#NullByte"><code>NullByte</code></a> 
+      <a href="/pkg/database/sql/#NullInt16"><code>NullInt16</code></a>
+      and
+      <a href="/pkg/database/sql/#NullByte"><code>NullByte</code></a>
       structs represent the int16 and byte values that may be null. These can be used as
       destinations of the <a href="/pkg/database/sql/#Scan"><code>Scan</code></a> method,
       similar to NullString.
@@ -875,8 +915,8 @@
   <dd>
     <p><!-- CL 272668 -->
       The new method <a href="/pkg/net/#IP.IsPrivate"><code>IP.IsPrivate</code></a> reports whether an address is
-      a private IPv4 address according to <a href="http://tools.ietf.org/html/rfc1918">RFC 1918</a>
-      or a local IPv6 address according <a href="http://tools.ietf.org/html/rfc4193">RFC 4193</a>.
+      a private IPv4 address according to <a href="https://datatracker.ietf.org/doc/rfc1918">RFC 1918</a>
+      or a local IPv6 address according <a href="https://datatracker.ietf.org/doc/rfc4193">RFC 4193</a>.
     </p>
 
     <p><!-- CL 301709 -->
@@ -978,6 +1018,18 @@
 
 <dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
   <dd>
+    <p><!-- CL 334669 -->
+      The new
+      <a href="/pkg/reflect/#Value.CanConvert"><code>Value.CanConvert</code></a>
+      method reports whether a value can be converted to a type.
+      This may be used to avoid a panic when converting a slice to an
+      array pointer type if the slice is too short.
+      Previously it was sufficient to use
+      <a href="/pkg/reflect/#Type.ConvertibleTo"><code>Type.ConvertibleTo</code></a>
+      for this, but the newly permitted conversion from slice to array
+      pointer type can panic even if the types are convertible.
+    </p>
+
     <p><!-- CL 266197 -->
       The new
       <a href="/pkg/reflect/#StructField.IsExported"><code>StructField.IsExported</code></a>
@@ -1153,11 +1205,11 @@
 
     <p><!-- CL 300996 -->
       The package now accepts comma "," as a separator for fractional seconds when parsing and formatting time.
-      The following time formats are now accepted:
+      For example, the following time layouts are now accepted:
       <ul>
-        <li>2006-01-02 14:06:03,999999999 -0700 MST</li>
-        <li>Mon Jan _2 14:06:03,120007 2006</li>
-        <li>Mon Jan 2 14:06:03,120007 2006</li>
+        <li>2006-01-02 15:04:05,999999999 -0700 MST</li>
+        <li>Mon Jan _2 15:04:05,000000 2006</li>
+        <li>Monday, January 2 15:04:05,000 2006</li>
       </ul>
     </p>
 
diff --git a/doc/go_spec.html b/doc/go_spec.html
index ad21ffb..fd5fee4 100644
--- a/doc/go_spec.html
+++ b/doc/go_spec.html
@@ -1,6 +1,6 @@
 <!--{
 	"Title": "The Go Programming Language Specification",
-	"Subtitle": "Version of Jul 1, 2021",
+	"Subtitle": "Version of Jul 26, 2021",
 	"Path": "/ref/spec"
 }-->
 
@@ -490,8 +490,8 @@
 \n   U+000A line feed or newline
 \r   U+000D carriage return
 \t   U+0009 horizontal tab
-\v   U+000b vertical tab
-\\   U+005c backslash
+\v   U+000B vertical tab
+\\   U+005C backslash
 \'   U+0027 single quote  (valid escape only within rune literals)
 \"   U+0022 double quote  (valid escape only within string literals)
 </pre>
@@ -4329,12 +4329,16 @@
 <pre>
 s := make([]byte, 2, 4)
 s0 := (*[0]byte)(s)      // s0 != nil
+s1 := (*[1]byte)(s[1:])  // &amp;s1[0] == &amp;s[1]
 s2 := (*[2]byte)(s)      // &amp;s2[0] == &amp;s[0]
 s4 := (*[4]byte)(s)      // panics: len([4]byte) > len(s)
 
 var t []string
 t0 := (*[0]string)(t)    // t0 == nil
-t1 := (*[1]string)(t)    // panics: len([1]string) > len(s)
+t1 := (*[1]string)(t)    // panics: len([1]string) > len(t)
+
+u := make([]byte, 0)
+u0 = (*[0]byte)(u)       // u0 != nil
 </pre>
 
 <h3 id="Constant_expressions">Constant expressions</h3>
diff --git a/misc/cgo/testsanitizers/msan_test.go b/misc/cgo/testsanitizers/msan_test.go
index 2a3494f..5ee9947 100644
--- a/misc/cgo/testsanitizers/msan_test.go
+++ b/misc/cgo/testsanitizers/msan_test.go
@@ -42,6 +42,7 @@
 		{src: "msan5.go"},
 		{src: "msan6.go"},
 		{src: "msan7.go"},
+		{src: "msan8.go"},
 		{src: "msan_fail.go", wantErr: true},
 	}
 	for _, tc := range cases {
diff --git a/misc/cgo/testsanitizers/testdata/msan8.go b/misc/cgo/testsanitizers/testdata/msan8.go
new file mode 100644
index 0000000..1cb5c56
--- /dev/null
+++ b/misc/cgo/testsanitizers/testdata/msan8.go
@@ -0,0 +1,109 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+/*
+#include <pthread.h>
+#include <signal.h>
+#include <stdint.h>
+
+#include <sanitizer/msan_interface.h>
+
+// cgoTracebackArg is the type of the argument passed to msanGoTraceback.
+struct cgoTracebackArg {
+	uintptr_t context;
+	uintptr_t sigContext;
+	uintptr_t* buf;
+	uintptr_t max;
+};
+
+// msanGoTraceback is registered as the cgo traceback function.
+// This will be called when a signal occurs.
+void msanGoTraceback(void* parg) {
+	struct cgoTracebackArg* arg = (struct cgoTracebackArg*)(parg);
+        arg->buf[0] = 0;
+}
+
+// msanGoWait will be called with all registers undefined as far as
+// msan is concerned. It just waits for a signal.
+// Because the registers are msan-undefined, the signal handler will
+// be invoked with all registers msan-undefined.
+__attribute__((noinline))
+void msanGoWait(unsigned long a1, unsigned long a2, unsigned long a3, unsigned long a4, unsigned long a5, unsigned long a6) {
+	sigset_t mask;
+
+	sigemptyset(&mask);
+        sigsuspend(&mask);
+}
+
+// msanGoSignalThread is the thread ID of the msanGoLoop thread.
+static pthread_t msanGoSignalThread;
+
+// msanGoSignalThreadSet is used to record that msanGoSignalThread
+// has been initialized. This is accessed atomically.
+static int32_t msanGoSignalThreadSet;
+
+// uninit is explicitly poisoned, so that we can make all registers
+// undefined by calling msanGoWait.
+static unsigned long uninit;
+
+// msanGoLoop loops calling msanGoWait, with the arguments passed
+// such that msan thinks that they are undefined. msan permits
+// undefined values to be used as long as they are not used to
+// for conditionals or for memory access.
+void msanGoLoop() {
+	int i;
+
+	msanGoSignalThread = pthread_self();
+        __atomic_store_n(&msanGoSignalThreadSet, 1, __ATOMIC_SEQ_CST);
+
+	// Force uninit to be undefined for msan.
+	__msan_poison(&uninit, sizeof uninit);
+	for (i = 0; i < 100; i++) {
+		msanGoWait(uninit, uninit, uninit, uninit, uninit, uninit);
+        }
+}
+
+// msanGoReady returns whether msanGoSignalThread is set.
+int msanGoReady() {
+	return __atomic_load_n(&msanGoSignalThreadSet, __ATOMIC_SEQ_CST) != 0;
+}
+
+// msanGoSendSignal sends a signal to the msanGoLoop thread.
+void msanGoSendSignal() {
+	pthread_kill(msanGoSignalThread, SIGWINCH);
+}
+*/
+import "C"
+
+import (
+	"runtime"
+	"time"
+)
+
+func main() {
+	runtime.SetCgoTraceback(0, C.msanGoTraceback, nil, nil)
+
+	c := make(chan bool)
+	go func() {
+		defer func() { c <- true }()
+		C.msanGoLoop()
+	}()
+
+	for C.msanGoReady() == 0 {
+		time.Sleep(time.Microsecond)
+	}
+
+loop:
+	for {
+		select {
+		case <-c:
+			break loop
+		default:
+			C.msanGoSendSignal()
+			time.Sleep(time.Microsecond)
+		}
+	}
+}
diff --git a/src/cmd/compile/internal/abi/abiutils.go b/src/cmd/compile/internal/abi/abiutils.go
index b8ea195..d657ddc 100644
--- a/src/cmd/compile/internal/abi/abiutils.go
+++ b/src/cmd/compile/internal/abi/abiutils.go
@@ -446,35 +446,20 @@
 	return result
 }
 
-// parameterUpdateMu protects the Offset field of function/method parameters (a subset of structure Fields)
-var parameterUpdateMu sync.Mutex
-
-// FieldOffsetOf returns a concurrency-safe version of f.Offset
-func FieldOffsetOf(f *types.Field) int64 {
-	parameterUpdateMu.Lock()
-	defer parameterUpdateMu.Unlock()
-	return f.Offset
-}
-
 func (config *ABIConfig) updateOffset(result *ABIParamResultInfo, f *types.Field, a ABIParamAssignment, isReturn, setNname bool) {
 	// Everything except return values in registers has either a frame home (if not in a register) or a frame spill location.
 	if !isReturn || len(a.Registers) == 0 {
 		// The type frame offset DOES NOT show effects of minimum frame size.
 		// Getting this wrong breaks stackmaps, see liveness/plive.go:WriteFuncMap and typebits/typebits.go:Set
-		parameterUpdateMu.Lock()
-		defer parameterUpdateMu.Unlock()
 		off := a.FrameOffset(result)
 		fOffset := f.Offset
 		if fOffset == types.BOGUS_FUNARG_OFFSET {
-			// Set the Offset the first time. After that, we may recompute it, but it should never change.
-			f.Offset = off
-			if f.Nname != nil {
-				// always set it in this case.
+			if setNname && f.Nname != nil {
 				f.Nname.(*ir.Name).SetFrameOffset(off)
 				f.Nname.(*ir.Name).SetIsOutputParamInRegisters(false)
 			}
-		} else if fOffset != off {
-			base.Fatalf("offset for %s at %s changed from %d to %d", f.Sym.Name, base.FmtPos(f.Pos), fOffset, off)
+		} else {
+			base.Fatalf("field offset for %s at %s has been set to %d", f.Sym.Name, base.FmtPos(f.Pos), fOffset)
 		}
 	} else {
 		if setNname && f.Nname != nil {
diff --git a/src/cmd/compile/internal/gc/obj.go b/src/cmd/compile/internal/gc/obj.go
index 55a0ab7..474d718 100644
--- a/src/cmd/compile/internal/gc/obj.go
+++ b/src/cmd/compile/internal/gc/obj.go
@@ -148,7 +148,7 @@
 	if reflectdata.ZeroSize > 0 {
 		zero := base.PkgLinksym("go.map", "zero", obj.ABI0)
 		objw.Global(zero, int32(reflectdata.ZeroSize), obj.DUPOK|obj.RODATA)
-		zero.Set(obj.AttrContentAddressable, true)
+		zero.Set(obj.AttrStatic, true)
 	}
 
 	staticdata.WriteFuncSyms()
diff --git a/src/cmd/compile/internal/ssagen/ssa.go b/src/cmd/compile/internal/ssagen/ssa.go
index f1dc56e..dfa7600 100644
--- a/src/cmd/compile/internal/ssagen/ssa.go
+++ b/src/cmd/compile/internal/ssagen/ssa.go
@@ -1296,7 +1296,7 @@
 		if f.Sym.IsBlank() {
 			continue
 		}
-		offptr := s.newValue1I(ssa.OpOffPtr, types.NewPtr(f.Type), abi.FieldOffsetOf(f), addr)
+		offptr := s.newValue1I(ssa.OpOffPtr, types.NewPtr(f.Type), f.Offset, addr)
 		s.instrumentFields(f.Type, offptr, kind)
 	}
 }
@@ -5053,19 +5053,23 @@
 		ft := fn.Type()
 		off := t.FieldOff(12) // TODO register args: be sure this isn't a hardcoded param stack offset.
 		args := n.Args
+		i0 := 0
 
 		// Set receiver (for interface calls). Always a pointer.
 		if rcvr != nil {
 			p := s.newValue1I(ssa.OpOffPtr, ft.Recv().Type.PtrTo(), off, addr)
 			s.store(types.Types[types.TUINTPTR], p, rcvr)
+			i0 = 1
 		}
 		// Set receiver (for method calls).
 		if n.Op() == ir.OCALLMETH {
 			base.Fatalf("OCALLMETH missed by walkCall")
 		}
 		// Set other args.
-		for _, f := range ft.Params().Fields().Slice() {
-			s.storeArgWithBase(args[0], f.Type, addr, off+abi.FieldOffsetOf(f))
+		// This code is only used when RegabiDefer is not enabled, and arguments are always
+		// passed on stack.
+		for i, f := range ft.Params().Fields().Slice() {
+			s.storeArgWithBase(args[0], f.Type, addr, off+params.InParam(i+i0).FrameOffset(params))
 			args = args[1:]
 		}
 
@@ -5078,7 +5082,6 @@
 		if stksize < int64(types.PtrSize) {
 			// We need room for both the call to deferprocStack and the call to
 			// the deferred function.
-			// TODO(register args) Revisit this if/when we pass args in registers.
 			stksize = int64(types.PtrSize)
 		}
 		call.AuxInt = stksize
@@ -6598,6 +6601,7 @@
 	x := base.Ctxt.Lookup(fmt.Sprintf("%s.arginfo%d", f.LSym.Name, f.ABI))
 
 	PtrSize := int64(types.PtrSize)
+	uintptrTyp := types.Types[types.TUINTPTR]
 
 	isAggregate := func(t *types.Type) bool {
 		return t.IsStruct() || t.IsArray() || t.IsComplex() || t.IsInterface() || t.IsString() || t.IsSlice()
@@ -6641,12 +6645,8 @@
 	n := 0
 	writebyte := func(o uint8) { wOff = objw.Uint8(x, wOff, o) }
 
-	// Write one non-aggrgate arg/field/element if there is room.
-	// Returns whether to continue.
-	write1 := func(sz, offset int64) bool {
-		if n >= limit {
-			return false
-		}
+	// Write one non-aggrgate arg/field/element.
+	write1 := func(sz, offset int64) {
 		if offset >= _special {
 			writebyte(_offsetTooLarge)
 		} else {
@@ -6654,7 +6654,6 @@
 			writebyte(uint8(sz))
 		}
 		n++
-		return true
 	}
 
 	// Visit t recursively and write it out.
@@ -6662,10 +6661,12 @@
 	var visitType func(baseOffset int64, t *types.Type, depth int) bool
 	visitType = func(baseOffset int64, t *types.Type, depth int) bool {
 		if n >= limit {
+			writebyte(_dotdotdot)
 			return false
 		}
 		if !isAggregate(t) {
-			return write1(t.Size(), baseOffset)
+			write1(t.Size(), baseOffset)
+			return true
 		}
 		writebyte(_startAgg)
 		depth++
@@ -6675,58 +6676,47 @@
 			n++
 			return true
 		}
-		var r bool
 		switch {
 		case t.IsInterface(), t.IsString():
-			r = write1(PtrSize, baseOffset) &&
-				write1(PtrSize, baseOffset+PtrSize)
+			_ = visitType(baseOffset, uintptrTyp, depth) &&
+				visitType(baseOffset+PtrSize, uintptrTyp, depth)
 		case t.IsSlice():
-			r = write1(PtrSize, baseOffset) &&
-				write1(PtrSize, baseOffset+PtrSize) &&
-				write1(PtrSize, baseOffset+PtrSize*2)
+			_ = visitType(baseOffset, uintptrTyp, depth) &&
+				visitType(baseOffset+PtrSize, uintptrTyp, depth) &&
+				visitType(baseOffset+PtrSize*2, uintptrTyp, depth)
 		case t.IsComplex():
-			r = write1(t.Size()/2, baseOffset) &&
-				write1(t.Size()/2, baseOffset+t.Size()/2)
+			_ = visitType(baseOffset, types.FloatForComplex(t), depth) &&
+				visitType(baseOffset+t.Size()/2, types.FloatForComplex(t), depth)
 		case t.IsArray():
-			r = true
 			if t.NumElem() == 0 {
 				n++ // {} counts as a component
 				break
 			}
 			for i := int64(0); i < t.NumElem(); i++ {
 				if !visitType(baseOffset, t.Elem(), depth) {
-					r = false
 					break
 				}
 				baseOffset += t.Elem().Size()
 			}
 		case t.IsStruct():
-			r = true
 			if t.NumFields() == 0 {
 				n++ // {} counts as a component
 				break
 			}
 			for _, field := range t.Fields().Slice() {
 				if !visitType(baseOffset+field.Offset, field.Type, depth) {
-					r = false
 					break
 				}
 			}
 		}
-		if !r {
-			writebyte(_dotdotdot)
-		}
 		writebyte(_endAgg)
-		return r
+		return true
 	}
 
-	c := true
 	for _, a := range abiInfo.InParams() {
-		if !c {
-			writebyte(_dotdotdot)
+		if !visitType(a.FrameOffset(abiInfo), a.Type, 0) {
 			break
 		}
-		c = visitType(a.FrameOffset(abiInfo), a.Type, 0)
 	}
 	writebyte(_endSeq)
 	if wOff > maxLen {
diff --git a/src/cmd/compile/internal/typecheck/dcl.go b/src/cmd/compile/internal/typecheck/dcl.go
index f3058d8..5b771e3 100644
--- a/src/cmd/compile/internal/typecheck/dcl.go
+++ b/src/cmd/compile/internal/typecheck/dcl.go
@@ -106,7 +106,17 @@
 // Redeclared emits a diagnostic about symbol s being redeclared at pos.
 func Redeclared(pos src.XPos, s *types.Sym, where string) {
 	if !s.Lastlineno.IsKnown() {
-		pkgName := DotImportRefs[s.Def.(*ir.Ident)]
+		var pkgName *ir.PkgName
+		if s.Def == nil {
+			for id, pkg := range DotImportRefs {
+				if id.Sym().Name == s.Name {
+					pkgName = pkg
+					break
+				}
+			}
+		} else {
+			pkgName = DotImportRefs[s.Def.(*ir.Ident)]
+		}
 		base.ErrorfAt(pos, "%v redeclared %s\n"+
 			"\t%v: previous declaration during import %q", s, where, base.FmtPos(pkgName.Pos()), pkgName.Pkg.Path)
 	} else {
diff --git a/src/cmd/compile/internal/typecheck/iimport.go b/src/cmd/compile/internal/typecheck/iimport.go
index a5ddbb5..37f5a7b 100644
--- a/src/cmd/compile/internal/typecheck/iimport.go
+++ b/src/cmd/compile/internal/typecheck/iimport.go
@@ -1540,7 +1540,7 @@
 func builtinCall(pos src.XPos, op ir.Op) *ir.CallExpr {
 	if go117ExportTypes {
 		// These should all be encoded as direct ops, not OCALL.
-		base.Fatalf("builtinCall should not be invoked when types are included in inport/export")
+		base.Fatalf("builtinCall should not be invoked when types are included in import/export")
 	}
 	return ir.NewCallExpr(pos, ir.OCALL, ir.NewIdent(base.Pos, types.BuiltinPkg.Lookup(ir.OpNames[op])), nil)
 }
diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
index 8776f31..320c110 100644
--- a/src/cmd/dist/build.go
+++ b/src/cmd/dist/build.go
@@ -1264,14 +1264,19 @@
 	timelog("start", "dist bootstrap")
 	defer timelog("end", "dist bootstrap")
 
-	var noBanner bool
+	var noBanner, noClean bool
 	var debug bool
 	flag.BoolVar(&rebuildall, "a", rebuildall, "rebuild all")
 	flag.BoolVar(&debug, "d", debug, "enable debugging of bootstrap process")
 	flag.BoolVar(&noBanner, "no-banner", noBanner, "do not print banner")
+	flag.BoolVar(&noClean, "no-clean", noClean, "print deprecation warning")
 
 	xflagparse(0)
 
+	if noClean {
+		xprintf("warning: --no-clean is deprecated and has no effect; use 'go install std cmd' instead\n")
+	}
+
 	// Set GOPATH to an internal directory. We shouldn't actually
 	// need to store files here, since the toolchain won't
 	// depend on modules outside of vendor directories, but if
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go
index 90eb3e2..7f88d32 100644
--- a/src/cmd/go/alldocs.go
+++ b/src/cmd/go/alldocs.go
@@ -1078,7 +1078,7 @@
 //
 // Usage:
 //
-// 	go mod edit [editing flags] [go.mod]
+// 	go mod edit [editing flags] [-fmt|-print|-json] [go.mod]
 //
 // Edit provides a command-line interface for editing go.mod,
 // for use primarily by tools or scripts. It reads only go.mod;
@@ -1193,7 +1193,7 @@
 // and one of its requirements. Each module is identified as a string of the form
 // path@version, except for the main module, which has no @version suffix.
 //
-// The -go flag causes graph to report the module graph as loaded by by the
+// The -go flag causes graph to report the module graph as loaded by the
 // given Go version, instead of the version indicated by the 'go' directive
 // in the go.mod file.
 //
@@ -1204,7 +1204,7 @@
 //
 // Usage:
 //
-// 	go mod init [module]
+// 	go mod init [module-path]
 //
 // Init initializes and writes a new go.mod file in the current directory, in
 // effect creating a new module rooted at the current directory. The go.mod file
diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go
index c0c86ab..6ce2765 100644
--- a/src/cmd/go/go_test.go
+++ b/src/cmd/go/go_test.go
@@ -2848,3 +2848,35 @@
 	// `go version` should not fail
 	tg.run("version")
 }
+
+// A missing C compiler should not force the net package to be stale.
+// Issue 47215.
+func TestMissingCC(t *testing.T) {
+	if !canCgo {
+		t.Skip("test is only meaningful on systems with cgo")
+	}
+	cc := os.Getenv("CC")
+	if cc == "" {
+		cc = "gcc"
+	}
+	if filepath.IsAbs(cc) {
+		t.Skipf(`"CC" (%s) is an absolute path`, cc)
+	}
+	_, err := exec.LookPath(cc)
+	if err != nil {
+		t.Skipf(`"CC" (%s) not on PATH`, cc)
+	}
+
+	tg := testgo(t)
+	defer tg.cleanup()
+	netStale, _ := tg.isStale("net")
+	if netStale {
+		t.Skip(`skipping test because "net" package is currently stale`)
+	}
+
+	tg.setenv("PATH", "") // No C compiler on PATH.
+	netStale, _ = tg.isStale("net")
+	if netStale {
+		t.Error(`clearing "PATH" causes "net" to be stale`)
+	}
+}
diff --git a/src/cmd/go/internal/modcmd/edit.go b/src/cmd/go/internal/modcmd/edit.go
index e856e7c..bb3d521 100644
--- a/src/cmd/go/internal/modcmd/edit.go
+++ b/src/cmd/go/internal/modcmd/edit.go
@@ -25,7 +25,7 @@
 )
 
 var cmdEdit = &base.Command{
-	UsageLine: "go mod edit [editing flags] [go.mod]",
+	UsageLine: "go mod edit [editing flags] [-fmt|-print|-json] [go.mod]",
 	Short:     "edit go.mod from tools or scripts",
 	Long: `
 Edit provides a command-line interface for editing go.mod,
diff --git a/src/cmd/go/internal/modcmd/graph.go b/src/cmd/go/internal/modcmd/graph.go
index 903bd99..ac81f26 100644
--- a/src/cmd/go/internal/modcmd/graph.go
+++ b/src/cmd/go/internal/modcmd/graph.go
@@ -26,7 +26,7 @@
 and one of its requirements. Each module is identified as a string of the form
 path@version, except for the main module, which has no @version suffix.
 
-The -go flag causes graph to report the module graph as loaded by by the
+The -go flag causes graph to report the module graph as loaded by the
 given Go version, instead of the version indicated by the 'go' directive
 in the go.mod file.
 
diff --git a/src/cmd/go/internal/modcmd/init.go b/src/cmd/go/internal/modcmd/init.go
index 73cc282..958c306 100644
--- a/src/cmd/go/internal/modcmd/init.go
+++ b/src/cmd/go/internal/modcmd/init.go
@@ -13,7 +13,7 @@
 )
 
 var cmdInit = &base.Command{
-	UsageLine: "go mod init [module]",
+	UsageLine: "go mod init [module-path]",
 	Short:     "initialize new module in current directory",
 	Long: `
 Init initializes and writes a new go.mod file in the current directory, in
diff --git a/src/cmd/go/internal/modfetch/coderepo.go b/src/cmd/go/internal/modfetch/coderepo.go
index f817a04..dfef9f7 100644
--- a/src/cmd/go/internal/modfetch/coderepo.go
+++ b/src/cmd/go/internal/modfetch/coderepo.go
@@ -864,22 +864,25 @@
 	data, err = r.code.ReadFile(rev, path.Join(dir, "go.mod"), codehost.MaxGoMod)
 	if err != nil {
 		if os.IsNotExist(err) {
-			return r.legacyGoMod(rev, dir), nil
+			return LegacyGoMod(r.modPath), nil
 		}
 		return nil, err
 	}
 	return data, nil
 }
 
-func (r *codeRepo) legacyGoMod(rev, dir string) []byte {
-	// We used to try to build a go.mod reflecting pre-existing
-	// package management metadata files, but the conversion
-	// was inherently imperfect (because those files don't have
-	// exactly the same semantics as go.mod) and, when done
-	// for dependencies in the middle of a build, impossible to
-	// correct. So we stopped.
-	// Return a fake go.mod that simply declares the module path.
-	return []byte(fmt.Sprintf("module %s\n", modfile.AutoQuote(r.modPath)))
+// LegacyGoMod generates a fake go.mod file for a module that doesn't have one.
+// The go.mod file contains a module directive and nothing else: no go version,
+// no requirements.
+//
+// We used to try to build a go.mod reflecting pre-existing
+// package management metadata files, but the conversion
+// was inherently imperfect (because those files don't have
+// exactly the same semantics as go.mod) and, when done
+// for dependencies in the middle of a build, impossible to
+// correct. So we stopped.
+func LegacyGoMod(modPath string) []byte {
+	return []byte(fmt.Sprintf("module %s\n", modfile.AutoQuote(modPath)))
 }
 
 func (r *codeRepo) modPrefix(rev string) string {
diff --git a/src/cmd/go/internal/modload/buildlist.go b/src/cmd/go/internal/modload/buildlist.go
index 604a57b..bf69567 100644
--- a/src/cmd/go/internal/modload/buildlist.go
+++ b/src/cmd/go/internal/modload/buildlist.go
@@ -191,6 +191,19 @@
 	return "", false
 }
 
+// hasRedundantRoot returns true if the root list contains multiple requirements
+// of the same module or a requirement on any version of the main module.
+// Redundant requirements should be pruned, but they may influence version
+// selection.
+func (rs *Requirements) hasRedundantRoot() bool {
+	for i, m := range rs.rootModules {
+		if m.Path == Target.Path || (i > 0 && m.Path == rs.rootModules[i-1].Path) {
+			return true
+		}
+	}
+	return false
+}
+
 // Graph returns the graph of module requirements loaded from the current
 // root modules (as reported by RootModules).
 //
@@ -882,6 +895,12 @@
 		// and (trivially) version.
 
 		if !rootsUpgraded {
+			if cfg.BuildMod != "mod" {
+				// The only changes to the root set (if any) were to remove duplicates.
+				// The requirements are consistent (if perhaps redundant), so keep the
+				// original rs to preserve its ModuleGraph.
+				return rs, nil
+			}
 			// The root set has converged: every root going into this iteration was
 			// already at its selected version, although we have have removed other
 			// (redundant) roots for the same path.
diff --git a/src/cmd/go/internal/modload/init.go b/src/cmd/go/internal/modload/init.go
index a8cbd9f..45f724d 100644
--- a/src/cmd/go/internal/modload/init.go
+++ b/src/cmd/go/internal/modload/init.go
@@ -449,13 +449,22 @@
 	}
 
 	setDefaultBuildMod() // possibly enable automatic vendoring
-	rs = requirementsFromModFile(ctx)
-
+	rs = requirementsFromModFile()
 	if cfg.BuildMod == "vendor" {
 		readVendorList()
 		checkVendorConsistency()
 		rs.initVendor(vendorList)
 	}
+	if rs.hasRedundantRoot() {
+		// If any module path appears more than once in the roots, we know that the
+		// go.mod file needs to be updated even though we have not yet loaded any
+		// transitive dependencies.
+		rs, err = updateRoots(ctx, rs.direct, rs, nil, nil, false)
+		if err != nil {
+			base.Fatalf("go: %v", err)
+		}
+	}
+
 	if index.goVersionV == "" {
 		// TODO(#45551): Do something more principled instead of checking
 		// cfg.CmdName directly here.
@@ -530,7 +539,12 @@
 		base.Fatalf("go: %v", err)
 	}
 
-	commitRequirements(ctx, modFileGoVersion(), requirementsFromModFile(ctx))
+	rs := requirementsFromModFile()
+	rs, err = updateRoots(ctx, rs.direct, rs, nil, nil, false)
+	if err != nil {
+		base.Fatalf("go: %v", err)
+	}
+	commitRequirements(ctx, modFileGoVersion(), rs)
 
 	// Suggest running 'go mod tidy' unless the project is empty. Even if we
 	// imported all the correct requirements above, we're probably missing
@@ -641,9 +655,8 @@
 
 // requirementsFromModFile returns the set of non-excluded requirements from
 // the global modFile.
-func requirementsFromModFile(ctx context.Context) *Requirements {
+func requirementsFromModFile() *Requirements {
 	roots := make([]module.Version, 0, len(modFile.Require))
-	mPathCount := map[string]int{Target.Path: 1}
 	direct := map[string]bool{}
 	for _, r := range modFile.Require {
 		if index != nil && index.exclude[r.Mod] {
@@ -656,28 +669,12 @@
 		}
 
 		roots = append(roots, r.Mod)
-		mPathCount[r.Mod.Path]++
 		if !r.Indirect {
 			direct[r.Mod.Path] = true
 		}
 	}
 	module.Sort(roots)
 	rs := newRequirements(modDepthFromGoVersion(modFileGoVersion()), roots, direct)
-
-	// If any module path appears more than once in the roots, we know that the
-	// go.mod file needs to be updated even though we have not yet loaded any
-	// transitive dependencies.
-	for _, n := range mPathCount {
-		if n > 1 {
-			var err error
-			rs, err = updateRoots(ctx, rs.direct, rs, nil, nil, false)
-			if err != nil {
-				base.Fatalf("go: %v", err)
-			}
-			break
-		}
-	}
-
 	return rs
 }
 
diff --git a/src/cmd/go/internal/modload/load.go b/src/cmd/go/internal/modload/load.go
index 771b142..bce9ad8 100644
--- a/src/cmd/go/internal/modload/load.go
+++ b/src/cmd/go/internal/modload/load.go
@@ -1808,7 +1808,7 @@
 		fmt.Fprintf(os.Stderr, "If reproducibility with go %s is not needed:\n\tgo mod tidy%s -compat=%s\n", ld.TidyCompatibleVersion, goFlag, ld.GoVersion)
 
 		// TODO(#46141): Populate the linked wiki page.
-		fmt.Fprintf(os.Stderr, "For other options, see:\n\thttps://golang.org/wiki/PruningModules\n")
+		fmt.Fprintf(os.Stderr, "For other options, see:\n\thttps://golang.org/doc/modules/pruning\n")
 	}
 
 	mg, err := rs.Graph(ctx)
diff --git a/src/cmd/go/internal/modload/modfile.go b/src/cmd/go/internal/modload/modfile.go
index d280945..03e02e7 100644
--- a/src/cmd/go/internal/modload/modfile.go
+++ b/src/cmd/go/internal/modload/modfile.go
@@ -595,47 +595,14 @@
 	}
 	c := rawGoModSummaryCache.Do(m, func() interface{} {
 		summary := new(modFileSummary)
-		var f *modfile.File
-		if m.Version == "" {
-			// m is a replacement module with only a file path.
-			dir := m.Path
-			if !filepath.IsAbs(dir) {
-				dir = filepath.Join(ModRoot(), dir)
-			}
-			gomod := filepath.Join(dir, "go.mod")
-			var data []byte
-			var err error
-			if gomodActual, ok := fsys.OverlayPath(gomod); ok {
-				// Don't lock go.mod if it's part of the overlay.
-				// On Plan 9, locking requires chmod, and we don't want to modify any file
-				// in the overlay. See #44700.
-				data, err = os.ReadFile(gomodActual)
-			} else {
-				data, err = lockedfile.Read(gomodActual)
-			}
-			if err != nil {
-				return cached{nil, module.VersionError(m, fmt.Errorf("reading %s: %v", base.ShortPath(gomod), err))}
-			}
-			f, err = modfile.ParseLax(gomod, data, nil)
-			if err != nil {
-				return cached{nil, module.VersionError(m, fmt.Errorf("parsing %s: %v", base.ShortPath(gomod), err))}
-			}
-		} else {
-			if !semver.IsValid(m.Version) {
-				// Disallow the broader queries supported by fetch.Lookup.
-				base.Fatalf("go: internal error: %s@%s: unexpected invalid semantic version", m.Path, m.Version)
-			}
-
-			data, err := modfetch.GoMod(m.Path, m.Version)
-			if err != nil {
-				return cached{nil, err}
-			}
-			f, err = modfile.ParseLax("go.mod", data, nil)
-			if err != nil {
-				return cached{nil, module.VersionError(m, fmt.Errorf("parsing go.mod: %v", err))}
-			}
+		name, data, err := rawGoModData(m)
+		if err != nil {
+			return cached{nil, err}
 		}
-
+		f, err := modfile.ParseLax(name, data, nil)
+		if err != nil {
+			return cached{nil, module.VersionError(m, fmt.Errorf("parsing %s: %v", base.ShortPath(name), err))}
+		}
 		if f.Module != nil {
 			summary.module = f.Module.Mod
 			summary.deprecated = f.Module.Deprecated
@@ -671,6 +638,43 @@
 
 var rawGoModSummaryCache par.Cache // module.Version → rawGoModSummary result
 
+// rawGoModData returns the content of the go.mod file for module m, ignoring
+// all replacements that may apply to m.
+//
+// rawGoModData cannot be used on the Target module.
+//
+// Unlike rawGoModSummary, rawGoModData does not cache its results in memory.
+// Use rawGoModSummary instead unless you specifically need these bytes.
+func rawGoModData(m module.Version) (name string, data []byte, err error) {
+	if m.Version == "" {
+		// m is a replacement module with only a file path.
+		dir := m.Path
+		if !filepath.IsAbs(dir) {
+			dir = filepath.Join(ModRoot(), dir)
+		}
+		name = filepath.Join(dir, "go.mod")
+		if gomodActual, ok := fsys.OverlayPath(name); ok {
+			// Don't lock go.mod if it's part of the overlay.
+			// On Plan 9, locking requires chmod, and we don't want to modify any file
+			// in the overlay. See #44700.
+			data, err = os.ReadFile(gomodActual)
+		} else {
+			data, err = lockedfile.Read(gomodActual)
+		}
+		if err != nil {
+			return "", nil, module.VersionError(m, fmt.Errorf("reading %s: %v", base.ShortPath(name), err))
+		}
+	} else {
+		if !semver.IsValid(m.Version) {
+			// Disallow the broader queries supported by fetch.Lookup.
+			base.Fatalf("go: internal error: %s@%s: unexpected invalid semantic version", m.Path, m.Version)
+		}
+		name = "go.mod"
+		data, err = modfetch.GoMod(m.Path, m.Version)
+	}
+	return name, data, err
+}
+
 // queryLatestVersionIgnoringRetractions looks up the latest version of the
 // module with the given path without considering retracted or excluded
 // versions.
diff --git a/src/cmd/go/internal/modload/query.go b/src/cmd/go/internal/modload/query.go
index dda9004..e737ca9 100644
--- a/src/cmd/go/internal/modload/query.go
+++ b/src/cmd/go/internal/modload/query.go
@@ -5,13 +5,13 @@
 package modload
 
 import (
+	"bytes"
 	"context"
 	"errors"
 	"fmt"
 	"io/fs"
 	"os"
 	pathpkg "path"
-	"path/filepath"
 	"sort"
 	"strings"
 	"sync"
@@ -931,14 +931,32 @@
 	return ok, err
 }
 
-func versionHasGoMod(ctx context.Context, m module.Version) (bool, error) {
-	needSum := false
-	root, _, err := fetch(ctx, m, needSum)
+// versionHasGoMod returns whether a version has a go.mod file.
+//
+// versionHasGoMod fetches the go.mod file (possibly a fake) and true if it
+// contains anything other than a module directive with the same path. When a
+// module does not have a real go.mod file, the go command acts as if it had one
+// that only contained a module directive. Normal go.mod files created after
+// 1.12 at least have a go directive.
+//
+// This function is a heuristic, since it's possible to commit a file that would
+// pass this test. However, we only need a heurstic for determining whether
+// +incompatible versions may be "latest", which is what this function is used
+// for.
+//
+// This heuristic is useful for two reasons: first, when using a proxy,
+// this lets us fetch from the .mod endpoint which is much faster than the .zip
+// endpoint. The .mod file is used anyway, even if the .zip file contains a
+// go.mod with different content. Second, if we don't fetch the .zip, then
+// we don't need to verify it in go.sum. This makes 'go list -m -u' faster
+// and simpler.
+func versionHasGoMod(_ context.Context, m module.Version) (bool, error) {
+	_, data, err := rawGoModData(m)
 	if err != nil {
 		return false, err
 	}
-	fi, err := os.Stat(filepath.Join(root, "go.mod"))
-	return err == nil && !fi.IsDir(), nil
+	isFake := bytes.Equal(data, modfetch.LegacyGoMod(m.Path))
+	return !isFake, nil
 }
 
 // A versionRepo is a subset of modfetch.Repo that can report information about
diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
index 981bc13..cd57496 100644
--- a/src/cmd/go/internal/work/exec.go
+++ b/src/cmd/go/internal/work/exec.go
@@ -252,8 +252,15 @@
 
 		ccExe := b.ccExe()
 		fmt.Fprintf(h, "CC=%q %q %q %q\n", ccExe, cppflags, cflags, ldflags)
-		if ccID, err := b.gccToolID(ccExe[0], "c"); err == nil {
-			fmt.Fprintf(h, "CC ID=%q\n", ccID)
+		// Include the C compiler tool ID so that if the C
+		// compiler changes we rebuild the package.
+		// But don't do that for standard library packages like net,
+		// so that the prebuilt .a files from a Go binary install
+		// don't need to be rebuilt with the local compiler.
+		if !p.Standard {
+			if ccID, err := b.gccToolID(ccExe[0], "c"); err == nil {
+				fmt.Fprintf(h, "CC ID=%q\n", ccID)
+			}
 		}
 		if len(p.CXXFiles)+len(p.SwigCXXFiles) > 0 {
 			cxxExe := b.cxxExe()
diff --git a/src/cmd/go/testdata/script/mod_tidy_compat_ambiguous.txt b/src/cmd/go/testdata/script/mod_tidy_compat_ambiguous.txt
index ed1dd53..c544cb7 100644
--- a/src/cmd/go/testdata/script/mod_tidy_compat_ambiguous.txt
+++ b/src/cmd/go/testdata/script/mod_tidy_compat_ambiguous.txt
@@ -23,7 +23,7 @@
 
 stderr '^example\.com/m imports\n\texample\.net/indirect imports\n\texample\.net/ambiguous/nested/pkg loaded from example\.net/ambiguous/nested@v0\.1\.0,\n\tbut go 1.16 would fail to locate it:\n\tambiguous import: found package example\.net/ambiguous/nested/pkg in multiple modules:\n\texample\.net/ambiguous v0.1.0 \(.*\)\n\texample\.net/ambiguous/nested v0.1.0 \(.*\)\n\n'
 
-stderr '\n\nTo proceed despite packages unresolved in go 1\.16:\n\tgo mod tidy -e\nIf reproducibility with go 1.16 is not needed:\n\tgo mod tidy -compat=1\.17\nFor other options, see:\n\thttps://golang\.org/wiki/PruningModules\n'
+stderr '\n\nTo proceed despite packages unresolved in go 1\.16:\n\tgo mod tidy -e\nIf reproducibility with go 1.16 is not needed:\n\tgo mod tidy -compat=1\.17\nFor other options, see:\n\thttps://golang\.org/doc/modules/pruning\n'
 
 cmp go.mod go.mod.orig
 
diff --git a/src/cmd/go/testdata/script/mod_tidy_compat_deleted.txt b/src/cmd/go/testdata/script/mod_tidy_compat_deleted.txt
index 3aacde2..dcf13e2 100644
--- a/src/cmd/go/testdata/script/mod_tidy_compat_deleted.txt
+++ b/src/cmd/go/testdata/script/mod_tidy_compat_deleted.txt
@@ -19,7 +19,7 @@
 
 stderr '^example\.com/m imports\n\texample\.net/deleted loaded from example\.net/deleted@v0\.1\.0,\n\tbut go 1\.16 would fail to locate it in example\.net/deleted@v0\.2\.0\n\n'
 
-stderr '\n\nTo upgrade to the versions selected by go 1.16, leaving some packages unresolved:\n\tgo mod tidy -e -go=1\.16 && go mod tidy -e -go=1\.17\nIf reproducibility with go 1.16 is not needed:\n\tgo mod tidy -compat=1\.17\nFor other options, see:\n\thttps://golang\.org/wiki/PruningModules\n'
+stderr '\n\nTo upgrade to the versions selected by go 1.16, leaving some packages unresolved:\n\tgo mod tidy -e -go=1\.16 && go mod tidy -e -go=1\.17\nIf reproducibility with go 1.16 is not needed:\n\tgo mod tidy -compat=1\.17\nFor other options, see:\n\thttps://golang\.org/doc/modules/pruning\n'
 
 
 # The suggested 'go mod tidy -e' command should proceed anyway.
diff --git a/src/cmd/go/testdata/script/mod_tidy_compat_implicit.txt b/src/cmd/go/testdata/script/mod_tidy_compat_implicit.txt
index e00aea9..186a3f8 100644
--- a/src/cmd/go/testdata/script/mod_tidy_compat_implicit.txt
+++ b/src/cmd/go/testdata/script/mod_tidy_compat_implicit.txt
@@ -33,7 +33,7 @@
 cp go.mod go.mod.orig
 ! go mod tidy
 stderr '^example\.com/m imports\n\texample\.net/lazy tested by\n\texample\.net/lazy.test imports\n\texample\.com/retract/incompatible loaded from example\.com/retract/incompatible@v1\.0\.0,\n\tbut go 1\.16 would select v2\.0\.0\+incompatible\n\n'
-stderr '\n\nTo upgrade to the versions selected by go 1\.16:\n\tgo mod tidy -go=1\.16 && go mod tidy -go=1\.17\nIf reproducibility with go 1.16 is not needed:\n\tgo mod tidy -compat=1.17\nFor other options, see:\n\thttps://golang\.org/wiki/PruningModules\n'
+stderr '\n\nTo upgrade to the versions selected by go 1\.16:\n\tgo mod tidy -go=1\.16 && go mod tidy -go=1\.17\nIf reproducibility with go 1.16 is not needed:\n\tgo mod tidy -compat=1.17\nFor other options, see:\n\thttps://golang\.org/doc/modules/pruning\n'
 
 cmp go.mod go.mod.orig
 
diff --git a/src/cmd/go/testdata/script/mod_tidy_compat_incompatible.txt b/src/cmd/go/testdata/script/mod_tidy_compat_incompatible.txt
index 2d87265..ea9e42e 100644
--- a/src/cmd/go/testdata/script/mod_tidy_compat_incompatible.txt
+++ b/src/cmd/go/testdata/script/mod_tidy_compat_incompatible.txt
@@ -33,7 +33,7 @@
 cp go.mod go.mod.orig
 ! go mod tidy
 stderr '^example\.com/m imports\n\texample\.net/lazy imports\n\texample\.com/retract/incompatible loaded from example\.com/retract/incompatible@v1\.0\.0,\n\tbut go 1\.16 would select v2\.0\.0\+incompatible\n\n'
-stderr '\n\nTo upgrade to the versions selected by go 1\.16:\n\tgo mod tidy -go=1\.16 && go mod tidy -go=1\.17\nIf reproducibility with go 1\.16 is not needed:\n\tgo mod tidy -compat=1.17\nFor other options, see:\n\thttps://golang\.org/wiki/PruningModules\n'
+stderr '\n\nTo upgrade to the versions selected by go 1\.16:\n\tgo mod tidy -go=1\.16 && go mod tidy -go=1\.17\nIf reproducibility with go 1\.16 is not needed:\n\tgo mod tidy -compat=1.17\nFor other options, see:\n\thttps://golang\.org/doc/modules/pruning\n'
 
 cmp go.mod go.mod.orig
 
diff --git a/src/cmd/go/testdata/script/mod_tidy_lazy_self.txt b/src/cmd/go/testdata/script/mod_tidy_lazy_self.txt
index ffcea18..9abbabd 100644
--- a/src/cmd/go/testdata/script/mod_tidy_lazy_self.txt
+++ b/src/cmd/go/testdata/script/mod_tidy_lazy_self.txt
@@ -2,18 +2,13 @@
 # 'go mod tidy' should not panic if the main module initially
 # requires an older version of itself.
 
+# A module may require an older version of itself without error. This is
+# inconsistent (the required version is never selected), but we still get
+# a reproducible build list.
+go list -m all
+stdout '^golang.org/issue/46078$'
 
-# A module that explicitly requires an older version of itself should be
-# rejected as inconsistent: we enforce that every explicit requirement is the
-# selected version of its module path, but the selected version of the main
-# module is always itself — not some explicit version.
-
-! go list -m all
-stderr '^go: updates to go\.mod needed; to update it:\n\tgo mod tidy$'
-
-
-# The suggested 'go mod tidy' command should succeed (not crash).
-
+# 'go mod tidy' should fix this (and not crash).
 go mod tidy
 
 
diff --git a/src/cmd/go/testdata/script/mod_update_sum_readonly.txt b/src/cmd/go/testdata/script/mod_update_sum_readonly.txt
new file mode 100644
index 0000000..41f12e4
--- /dev/null
+++ b/src/cmd/go/testdata/script/mod_update_sum_readonly.txt
@@ -0,0 +1,34 @@
+# When finding the latest version of a module, we should not download version
+# contents. Previously, we downloaded .zip files to determine whether a real
+# .mod file was present in order to decide whether +incompatible versions
+# could be "latest".
+#
+# Verifies #47377.
+
+# rsc.io/breaker has two versions, neither of which has a .mod file.
+go list -m -versions rsc.io/breaker
+stdout '^rsc.io/breaker v1.0.0 v2.0.0\+incompatible$'
+go mod download rsc.io/breaker@v1.0.0
+! grep '^go' $GOPATH/pkg/mod/cache/download/rsc.io/breaker/@v/v1.0.0.mod
+go mod download rsc.io/breaker@v2.0.0+incompatible
+! grep '^go' $GOPATH/pkg/mod/cache/download/rsc.io/breaker/@v/v2.0.0+incompatible.mod
+
+# Delete downloaded .zip files.
+go clean -modcache
+
+# Check for updates.
+go list -m -u rsc.io/breaker
+stdout '^rsc.io/breaker v1.0.0 \[v2.0.0\+incompatible\]$'
+
+# We should not have downloaded zips.
+! exists $GOPATH/pkg/mod/cache/download/rsc.io/breaker/@v/v1.0.0.zip
+! exists $GOPATH/pkg/mod/cache/download/rsc.io/breaker/@v/v2.0.0+incompatible.zip
+
+-- go.mod --
+module m
+
+go 1.16
+
+require rsc.io/breaker v1.0.0
+-- go.sum --
+rsc.io/breaker v1.0.0/go.mod h1:s5yxDXvD88U1/ESC23I2FK3Lkv4YIKaB1ij/Hbm805g=
diff --git a/src/cmd/go/testdata/script/mod_vendor_redundant_requirement.txt b/src/cmd/go/testdata/script/mod_vendor_redundant_requirement.txt
new file mode 100644
index 0000000..3f6f5c5
--- /dev/null
+++ b/src/cmd/go/testdata/script/mod_vendor_redundant_requirement.txt
@@ -0,0 +1,29 @@
+# 'go list -mod=vendor' should succeed even when go.mod contains redundant
+# requirements. Verifies #47565.
+go list -mod=vendor
+
+-- go.mod --
+module m
+
+go 1.17
+
+require example.com/m v0.0.0
+require example.com/m v0.0.0
+
+replace example.com/m v0.0.0 => ./m
+-- m/go.mod --
+module example.com/m
+
+go 1.17
+-- m/m.go --
+package m
+-- use.go --
+package use
+
+import _ "example.com/m"
+-- vendor/example.com/m/m.go --
+package m
+-- vendor/modules.txt --
+# example.com/m v0.0.0 => ./m
+## explicit; go 1.17
+example.com/m
diff --git a/src/cmd/internal/obj/textflag.go b/src/cmd/internal/obj/textflag.go
index 881e192..5ae7502 100644
--- a/src/cmd/internal/obj/textflag.go
+++ b/src/cmd/internal/obj/textflag.go
@@ -49,8 +49,8 @@
 	// Function can call reflect.Type.Method or reflect.Type.MethodByName.
 	REFLECTMETHOD = 1024
 
-	// Function is the top of the call stack. Call stack unwinders should stop
-	// at this function.
+	// Function is the outermost frame of the call stack. Call stack unwinders
+	// should stop at this function.
 	TOPFRAME = 2048
 
 	// Function is an ABI wrapper.
diff --git a/src/cmd/link/internal/loader/loader.go b/src/cmd/link/internal/loader/loader.go
index efca824..9d5319c 100644
--- a/src/cmd/link/internal/loader/loader.go
+++ b/src/cmd/link/internal/loader/loader.go
@@ -459,6 +459,15 @@
 		if l.flags&FlagStrictDups != 0 {
 			l.checkdup(name, r, li, oldi)
 		}
+		// Fix for issue #47185 -- given two dupok symbols with
+		// different sizes, favor symbol with larger size. See
+		// also issue #46653.
+		szdup := l.SymSize(oldi)
+		sz := int64(r.Sym(li).Siz())
+		if szdup < sz {
+			// new symbol overwrites old symbol.
+			l.objSyms[oldi] = objSym{r.objidx, li}
+		}
 		return oldi
 	}
 	oldr, oldli := l.toLocal(oldi)
diff --git a/src/cmd/vet/main.go b/src/cmd/vet/main.go
index a33bba2..7da8606 100644
--- a/src/cmd/vet/main.go
+++ b/src/cmd/vet/main.go
@@ -1,3 +1,7 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
 package main
 
 import (
diff --git a/src/cmd/vet/testdata/copylock/copylock.go b/src/cmd/vet/testdata/copylock/copylock.go
index 8079cf3..7cfafe6 100644
--- a/src/cmd/vet/testdata/copylock/copylock.go
+++ b/src/cmd/vet/testdata/copylock/copylock.go
@@ -1,3 +1,7 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
 package copylock
 
 import "sync"
diff --git a/src/cmd/vet/testdata/httpresponse/httpresponse.go b/src/cmd/vet/testdata/httpresponse/httpresponse.go
index 6141f6e..98e394a 100644
--- a/src/cmd/vet/testdata/httpresponse/httpresponse.go
+++ b/src/cmd/vet/testdata/httpresponse/httpresponse.go
@@ -1,3 +1,7 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
 package httpresponse
 
 import (
diff --git a/src/cmd/vet/testdata/testingpkg/tests.go b/src/cmd/vet/testdata/testingpkg/tests.go
index 69d29d3..8f4674d 100644
--- a/src/cmd/vet/testdata/testingpkg/tests.go
+++ b/src/cmd/vet/testdata/testingpkg/tests.go
@@ -1 +1,5 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
 package testdata
diff --git a/src/cmd/vet/testdata/testingpkg/tests_test.go b/src/cmd/vet/testdata/testingpkg/tests_test.go
index 09bb98d..815dcc8 100644
--- a/src/cmd/vet/testdata/testingpkg/tests_test.go
+++ b/src/cmd/vet/testdata/testingpkg/tests_test.go
@@ -1,3 +1,7 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
 package testdata
 
 func Example_BadSuffix() {} // ERROR "Example_BadSuffix has malformed example suffix: BadSuffix"
diff --git a/src/crypto/ed25519/internal/edwards25519/field/fe_amd64.go b/src/crypto/ed25519/internal/edwards25519/field/fe_amd64.go
index 44dc8e8..8fe5839 100644
--- a/src/crypto/ed25519/internal/edwards25519/field/fe_amd64.go
+++ b/src/crypto/ed25519/internal/edwards25519/field/fe_amd64.go
@@ -1,5 +1,6 @@
 // Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT.
 
+//go:build amd64 && gc && !purego
 // +build amd64,gc,!purego
 
 package field
diff --git a/src/crypto/x509/root.go b/src/crypto/x509/root.go
index cc53f7a..eef9c04 100644
--- a/src/crypto/x509/root.go
+++ b/src/crypto/x509/root.go
@@ -8,7 +8,7 @@
 // argument to the latest security_certificates version from
 // https://opensource.apple.com/source/security_certificates/
 // and run "go generate". See https://golang.org/issue/38843.
-//go:generate go run root_ios_gen.go -version 55188.40.9
+//go:generate go run root_ios_gen.go -version 55188.120.1.0.1
 
 import "sync"
 
diff --git a/src/crypto/x509/root_ios.go b/src/crypto/x509/root_ios.go
index 50432f3..9bc62f8 100644
--- a/src/crypto/x509/root_ios.go
+++ b/src/crypto/x509/root_ios.go
@@ -1,4 +1,4 @@
-// Code generated by root_ios_gen.go -version 55188.40.9; DO NOT EDIT.
+// Code generated by root_ios_gen.go -version 55188.120.1.0.1; DO NOT EDIT.
 // Update the version in root.go and regenerate with "go generate".
 
 //go:build ios && !x509omitbundledroots
@@ -2223,6 +2223,41 @@
 kPoUVy0D7O48027KqGx2vKLeuwIgJ6iFJzWbVsaj8kfSt24bAgAXqmemFZHe+pTs
 ewv4n4Q=
 -----END CERTIFICATE-----
+# "GlobalSign"
+# 2C AB EA FE 37 D0 6C A2 2A BA 73 91 C0 03 3D 25
+# 98 29 52 C4 53 64 73 49 76 3A 3A B5 AD 6C CF 69
+-----BEGIN CERTIFICATE-----
+MIIFgzCCA2ugAwIBAgIORea7A4Mzw4VlSOb/RVEwDQYJKoZIhvcNAQEMBQAwTDEg
+MB4GA1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjYxEzARBgNVBAoTCkdsb2Jh
+bFNpZ24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMTQxMjEwMDAwMDAwWhcNMzQx
+MjEwMDAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSNjET
+MBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCAiIwDQYJ
+KoZIhvcNAQEBBQADggIPADCCAgoCggIBAJUH6HPKZvnsFMp7PPcNCPG0RQssgrRI
+xutbPK6DuEGSMxSkb3/pKszGsIhrxbaJ0cay/xTOURQh7ErdG1rG1ofuTToVBu1k
+ZguSgMpE3nOUTvOniX9PeGMIyBJQbUJmL025eShNUhqKGoC3GYEOfsSKvGRMIRxD
+aNc9PIrFsmbVkJq3MQbFvuJtMgamHvm566qjuL++gmNQ0PAYid/kD3n16qIfKtJw
+LnvnvJO7bVPiSHyMEAc4/2ayd2F+4OqMPKq0pPbzlUoSB239jLKJz9CgYXfIWHSw
+1CM69106yqLbnQneXUQtkPGBzVeS+n68UARjNN9rkxi+azayOeSsJDa38O+2HBNX
+k7besvjihbdzorg1qkXy4J02oW9UivFyVm4uiMVRQkQVlO6jxTiWm05OWgtH8wY2
+SXcwvHE35absIQh1/OZhFj931dmRl4QKbNQCTXTAFO39OfuD8l4UoQSwC+n+7o/h
+bguyCLNhZglqsQY6ZZZZwPA1/cnaKI0aEYdwgQqomnUdnjqGBQCe24DWJfncBZ4n
+WUx2OVvq+aWh2IMP0f/fMBH5hc8zSPXKbWQULHpYT9NLCEnFlWQaYw55PfWzjMpY
+rZxCRXluDocZXFSxZba/jJvcE+kNb7gu3GduyYsRtYQUigAZcIN5kZeR1Bonvzce
+MgfYFGM8KEyvAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTAD
+AQH/MB0GA1UdDgQWBBSubAWjkxPioufi1xzWx/B/yGdToDAfBgNVHSMEGDAWgBSu
+bAWjkxPioufi1xzWx/B/yGdToDANBgkqhkiG9w0BAQwFAAOCAgEAgyXt6NH9lVLN
+nsAEoJFp5lzQhN7craJP6Ed41mWYqVuoPId8AorRbrcWc+ZfwFSY1XS+wc3iEZGt
+Ixg93eFyRJa0lV7Ae46ZeBZDE1ZXs6KzO7V33EByrKPrmzU+sQghoefEQzd5Mr61
+55wsTLxDKZmOMNOsIeDjHfrYBzN2VAAiKrlNIC5waNrlU/yDXNOd8v9EDERm8tLj
+vUYAGm0CuiVdjaExUd1URhxN25mW7xocBFymFe944Hn+Xds+qkxV/ZoVqW/hpvvf
+cDDpw+5CRu3CkwWJ+n1jez/QcYF8AOiYrg54NMMl+68KnyBr3TsTjxKM4kEaSHpz
+oHdpx7Zcf4LIHv5YGygrqGytXm3ABdJ7t+uA/iU3/gKbaKxCXcPu9czc8FB10jZp
+nOZ7BN9uBmm23goJSFmH63sUYHpkqmlD75HHTOwY3WzvUy2MmeFe8nI+z1TIvWfs
+pA9MRf/TuTAjB0yPEL+GltmZWrSZVxykzLsViVO6LAUP5MSeGbEYNNVMnbrt9x+v
+JJUEeKgDu+6B5dpffItKoZB0JaezPkvILFa9x8jvOOJckvB595yEunQtYQEgfn7R
+8k8HWV+LLUNS60YMlOH1Zkd5d9VUWx+tJDfLRVpOoERIyNiwmcUVhAn21klJwGW4
+5hpxbqCo8YLoRT5s1gLXCmeDBVrJpBA=
+-----END CERTIFICATE-----
 # "GlobalSign Root CA"
 # EB D4 10 40 E4 BB 3E C7 42 C9 E3 81 D3 1E F2 A4
 # 1A 48 B6 68 5C 96 E7 CE F3 C1 DF 6C D4 33 1C 99
diff --git a/src/go/build/syslist.go b/src/go/build/syslist.go
index 3ccd5df..a6af7ce 100644
--- a/src/go/build/syslist.go
+++ b/src/go/build/syslist.go
@@ -8,4 +8,4 @@
 // Do not remove from this list, as these are used for go/build filename matching.
 
 const goosList = "aix android darwin dragonfly freebsd fuchsia hurd illumos ios js linux nacl netbsd openbsd plan9 solaris windows zos "
-const goarchList = "386 amd64 amd64p32 arm armbe arm64 arm64be ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le ppc riscv riscv64 s390 s390x sparc sparc64 wasm "
+const goarchList = "386 amd64 amd64p32 arm armbe arm64 arm64be ppc64 ppc64le loong64 mips mipsle mips64 mips64le mips64p32 mips64p32le ppc riscv riscv64 s390 s390x sparc sparc64 wasm "
diff --git a/src/go/types/api_test.go b/src/go/types/api_test.go
index f37b91d..f964c65 100644
--- a/src/go/types/api_test.go
+++ b/src/go/types/api_test.go
@@ -322,6 +322,18 @@
 			`[][]struct{}`,
 		},
 
+		// issue 47243
+		{`package issue47243_a; var x int32; var _ = x << 3`, `3`, `untyped int`},
+		{`package issue47243_b; var x int32; var _ = x << 3.`, `3.`, `uint`}, // issue 47410: should be untyped float
+		{`package issue47243_c; var x int32; var _ = 1 << x`, `1 << x`, `int`},
+		{`package issue47243_d; var x int32; var _ = 1 << x`, `1`, `int`},
+		{`package issue47243_e; var x int32; var _ = 1 << 2`, `1`, `untyped int`},
+		{`package issue47243_f; var x int32; var _ = 1 << 2`, `2`, `untyped int`},
+		{`package issue47243_g; var x int32; var _ = int(1) << 2`, `2`, `untyped int`},
+		{`package issue47243_h; var x int32; var _ = 1 << (2 << x)`, `1`, `int`},
+		{`package issue47243_i; var x int32; var _ = 1 << (2 << x)`, `(2 << x)`, `untyped int`},
+		{`package issue47243_j; var x int32; var _ = 1 << (2 << x)`, `2`, `untyped int`},
+
 		// tests for broken code that doesn't parse or type-check
 		{broken + `x0; func _() { var x struct {f string}; x.f := 0 }`, `x.f`, `string`},
 		{broken + `x1; func _() { var z string; type x struct {f string}; y := &x{q: z}}`, `z`, `string`},
diff --git a/src/go/types/check_test.go b/src/go/types/check_test.go
index c85a8e4..f83abf1 100644
--- a/src/go/types/check_test.go
+++ b/src/go/types/check_test.go
@@ -344,6 +344,13 @@
 	checkFiles(t, nil, "", []string{"issue46453.go"}, [][]byte{[]byte(src)}, false, nil)
 }
 
+func TestIssue47243_TypedRHS(t *testing.T) {
+	// The RHS of the shift expression below overflows uint on 32bit platforms,
+	// but this is OK as it is explicitly typed.
+	const src = "package issue47243\n\nvar a uint64; var _ = a << uint64(4294967296)" // uint64(1<<32)
+	checkFiles(t, &StdSizes{4, 4}, "", []string{"p.go"}, [][]byte{[]byte(src)}, false, nil)
+}
+
 func TestCheck(t *testing.T)     { DefPredeclaredTestFuncs(); testDir(t, "check") }
 func TestExamples(t *testing.T)  { testDir(t, "examples") }
 func TestFixedbugs(t *testing.T) { testDir(t, "fixedbugs") }
diff --git a/src/go/types/expr.go b/src/go/types/expr.go
index 5c65fad..58962e7 100644
--- a/src/go/types/expr.go
+++ b/src/go/types/expr.go
@@ -778,32 +778,48 @@
 	// spec: "The right operand in a shift expression must have integer type
 	// or be an untyped constant representable by a value of type uint."
 
-	// Provide a good error message for negative shift counts.
+	// Check that constants are representable by uint, but do not convert them
+	// (see also issue #47243).
 	if y.mode == constant_ {
+		// Provide a good error message for negative shift counts.
 		yval := constant.ToInt(y.val) // consider -1, 1.0, but not -1.1
 		if yval.Kind() == constant.Int && constant.Sign(yval) < 0 {
 			check.invalidOp(y, _InvalidShiftCount, "negative shift count %s", y)
 			x.mode = invalid
 			return
 		}
+
+		if isUntyped(y.typ) {
+			// Caution: Check for representability here, rather than in the switch
+			// below, because isInteger includes untyped integers (was bug #43697).
+			check.representable(y, Typ[Uint])
+			if y.mode == invalid {
+				x.mode = invalid
+				return
+			}
+		}
 	}
 
-	// Caution: Check for isUntyped first because isInteger includes untyped
-	//          integers (was bug #43697).
-	if isUntyped(y.typ) {
+	// Check that RHS is otherwise at least of integer type.
+	switch {
+	case isInteger(y.typ):
+		if !isUnsigned(y.typ) && !check.allowVersion(check.pkg, 1, 13) {
+			check.invalidOp(y, _InvalidShiftCount, "signed shift count %s requires go1.13 or later", y)
+			x.mode = invalid
+			return
+		}
+	case isUntyped(y.typ):
+		// This is incorrect, but preserves pre-existing behavior.
+		// See also bug #47410.
 		check.convertUntyped(y, Typ[Uint])
 		if y.mode == invalid {
 			x.mode = invalid
 			return
 		}
-	} else if !isInteger(y.typ) {
+	default:
 		check.invalidOp(y, _InvalidShiftCount, "shift count %s must be integer", y)
 		x.mode = invalid
 		return
-	} else if !isUnsigned(y.typ) && !check.allowVersion(check.pkg, 1, 13) {
-		check.invalidOp(y, _InvalidShiftCount, "signed shift count %s requires go1.13 or later", y)
-		x.mode = invalid
-		return
 	}
 
 	if x.mode == constant_ {
diff --git a/src/io/fs/fs.go b/src/io/fs/fs.go
index e1be324..e603afa 100644
--- a/src/io/fs/fs.go
+++ b/src/io/fs/fs.go
@@ -86,7 +86,7 @@
 type DirEntry interface {
 	// Name returns the name of the file (or subdirectory) described by the entry.
 	// This name is only the final element of the path (the base name), not the entire path.
-	// For example, Name would return "hello.go" not "/home/gopher/hello.go".
+	// For example, Name would return "hello.go" not "home/gopher/hello.go".
 	Name() string
 
 	// IsDir reports whether the entry describes a directory.
diff --git a/src/make.bash b/src/make.bash
index 4fb13f6..7986125 100755
--- a/src/make.bash
+++ b/src/make.bash
@@ -130,8 +130,8 @@
 	export CGO_ENABLED=0
 fi
 
-# Test which linker/loader our system is using
-if type readelf >/dev/null 2>&1; then
+# Test which linker/loader our system is using, if GO_LDSO is not set.
+if [ -z "$GO_LDSO" ] && type readelf >/dev/null 2>&1; then
 	if echo "int main() { return 0; }" | ${CC:-cc} -o ./test-musl-ldso -x c - >/dev/null 2>&1; then
 		LDSO=$(readelf -l ./test-musl-ldso | grep 'interpreter:' | sed -e 's/^.*interpreter: \(.*\)[]]/\1/') >/dev/null 2>&1
 		[ -z "$LDSO" ] || export GO_LDSO="$LDSO"
@@ -203,16 +203,10 @@
 	exit 0
 fi
 
-buildall="-a"
-if [ "$1" = "--no-clean" ]; then
-	buildall=""
-	shift
-fi
-
 # Run dist bootstrap to complete make.bash.
 # Bootstrap installs a proper cmd/dist, built with the new toolchain.
 # Throw ours, built with Go 1.4, away after bootstrap.
-./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
+./cmd/dist/dist bootstrap -a $vflag $GO_DISTFLAGS "$@"
 rm -f ./cmd/dist/dist
 
 # DO NOT ADD ANY NEW CODE HERE.
diff --git a/src/make.bat b/src/make.bat
index b4a8e70..8f2825b 100644
--- a/src/make.bat
+++ b/src/make.bat
@@ -112,20 +112,20 @@
 if x%3==x--dist-tool goto copydist

 if x%4==x--dist-tool goto copydist

 

-set buildall=-a

-if x%1==x--no-clean set buildall=

-if x%2==x--no-clean set buildall=

-if x%3==x--no-clean set buildall=

-if x%4==x--no-clean set buildall=

-if x%1==x--no-banner set buildall=%buildall% --no-banner

-if x%2==x--no-banner set buildall=%buildall% --no-banner

-if x%3==x--no-banner set buildall=%buildall% --no-banner

-if x%4==x--no-banner set buildall=%buildall% --no-banner

+set bootstrapflags=

+if x%1==x--no-clean set bootstrapflags=--no-clean

+if x%2==x--no-clean set bootstrapflags=--no-clean

+if x%3==x--no-clean set bootstrapflags=--no-clean

+if x%4==x--no-clean set bootstrapflags=--no-clean

+if x%1==x--no-banner set bootstrapflags=%bootstrapflags% --no-banner

+if x%2==x--no-banner set bootstrapflags=%bootstrapflags% --no-banner

+if x%3==x--no-banner set bootstrapflags=%bootstrapflags% --no-banner

+if x%4==x--no-banner set bootstrapflags=%bootstrapflags% --no-banner

 

 :: Run dist bootstrap to complete make.bash.

 :: Bootstrap installs a proper cmd/dist, built with the new toolchain.

 :: Throw ours, built with Go 1.4, away after bootstrap.

-.\cmd\dist\dist.exe bootstrap %vflag% %buildall%

+.\cmd\dist\dist.exe bootstrap -a %vflag% %bootstrapflags%

 if errorlevel 1 goto fail

 del .\cmd\dist\dist.exe

 goto end

diff --git a/src/make.rc b/src/make.rc
index f5e57e9..7bdc7de 100755
--- a/src/make.rc
+++ b/src/make.rc
@@ -92,15 +92,10 @@
 	exit
 }
 
-buildall = -a
-if(~ $1 --no-clean) {
-	buildall = ()
-	shift
-}
 # Run dist bootstrap to complete make.bash.
 # Bootstrap installs a proper cmd/dist, built with the new toolchain.
 # Throw ours, built with Go 1.4, away after bootstrap.
-./cmd/dist/dist bootstrap $vflag $buildall $*
+./cmd/dist/dist bootstrap -a $vflag $*
 rm -f ./cmd/dist/dist
 
 # DO NOT ADD ANY NEW CODE HERE.
diff --git a/src/net/http/client.go b/src/net/http/client.go
index e0cabc9..4d380c6 100644
--- a/src/net/http/client.go
+++ b/src/net/http/client.go
@@ -951,7 +951,7 @@
 }
 
 // cancelTimerBody is an io.ReadCloser that wraps rc with two features:
-// 1) on Read error or close, the stop func is called.
+// 1) On Read error or close, the stop func is called.
 // 2) On Read failure, if reqDidTimeout is true, the error is wrapped and
 //    marked as net.Error that hit its timeout.
 type cancelTimerBody struct {
diff --git a/src/net/http/httputil/reverseproxy.go b/src/net/http/httputil/reverseproxy.go
index 5d39955..8b63368 100644
--- a/src/net/http/httputil/reverseproxy.go
+++ b/src/net/http/httputil/reverseproxy.go
@@ -235,6 +235,15 @@
 	if req.ContentLength == 0 {
 		outreq.Body = nil // Issue 16036: nil Body for http.Transport retries
 	}
+	if outreq.Body != nil {
+		// Reading from the request body after returning from a handler is not
+		// allowed, and the RoundTrip goroutine that reads the Body can outlive
+		// this handler. This can lead to a crash if the handler panics (see
+		// Issue 46866). Although calling Close doesn't guarantee there isn't
+		// any Read in flight after the handle returns, in practice it's safe to
+		// read after closing it.
+		defer outreq.Body.Close()
+	}
 	if outreq.Header == nil {
 		outreq.Header = make(http.Header) // Issue 33142: historical behavior was to always allocate
 	}
diff --git a/src/net/http/httputil/reverseproxy_test.go b/src/net/http/httputil/reverseproxy_test.go
index 1898ed8..4b6ad77 100644
--- a/src/net/http/httputil/reverseproxy_test.go
+++ b/src/net/http/httputil/reverseproxy_test.go
@@ -1122,6 +1122,45 @@
 	rproxy.ServeHTTP(httptest.NewRecorder(), req)
 }
 
+// Issue #46866: panic without closing incoming request body causes a panic
+func TestReverseProxy_PanicClosesIncomingBody(t *testing.T) {
+	backend := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+		out := "this call was relayed by the reverse proxy"
+		// Coerce a wrong content length to induce io.ErrUnexpectedEOF
+		w.Header().Set("Content-Length", fmt.Sprintf("%d", len(out)*2))
+		fmt.Fprintln(w, out)
+	}))
+	defer backend.Close()
+	backendURL, err := url.Parse(backend.URL)
+	if err != nil {
+		t.Fatal(err)
+	}
+	proxyHandler := NewSingleHostReverseProxy(backendURL)
+	proxyHandler.ErrorLog = log.New(io.Discard, "", 0) // quiet for tests
+	frontend := httptest.NewServer(proxyHandler)
+	defer frontend.Close()
+	frontendClient := frontend.Client()
+
+	var wg sync.WaitGroup
+	for i := 0; i < 2; i++ {
+		wg.Add(1)
+		go func() {
+			defer wg.Done()
+			for j := 0; j < 10; j++ {
+				const reqLen = 6 * 1024 * 1024
+				req, _ := http.NewRequest("POST", frontend.URL, &io.LimitedReader{R: neverEnding('x'), N: reqLen})
+				req.ContentLength = reqLen
+				resp, _ := frontendClient.Transport.RoundTrip(req)
+				if resp != nil {
+					io.Copy(io.Discard, resp.Body)
+					resp.Body.Close()
+				}
+			}
+		}()
+	}
+	wg.Wait()
+}
+
 func TestSelectFlushInterval(t *testing.T) {
 	tests := []struct {
 		name string
diff --git a/src/net/http/transport_test.go b/src/net/http/transport_test.go
index 690e0c2..eeaa492 100644
--- a/src/net/http/transport_test.go
+++ b/src/net/http/transport_test.go
@@ -6441,10 +6441,11 @@
 // Test that a new request which uses the connection of an active request
 // cannot cause it to be canceled as well.
 func TestCancelRequestWhenSharingConnection(t *testing.T) {
-	if testing.Short() {
-		t.Skip("skipping in short mode")
-	}
+	reqc := make(chan chan struct{}, 2)
 	ts := httptest.NewServer(HandlerFunc(func(w ResponseWriter, req *Request) {
+		ch := make(chan struct{}, 1)
+		reqc <- ch
+		<-ch
 		w.Header().Add("Content-Length", "0")
 	}))
 	defer ts.Close()
@@ -6456,34 +6457,58 @@
 
 	var wg sync.WaitGroup
 
-	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
-
-	for i := 0; i < 10; i++ {
-		wg.Add(1)
-		go func() {
-			defer wg.Done()
-			for ctx.Err() == nil {
-				reqctx, reqcancel := context.WithCancel(ctx)
-				go reqcancel()
-				req, _ := NewRequestWithContext(reqctx, "GET", ts.URL, nil)
-				res, err := client.Do(req)
-				if err == nil {
-					res.Body.Close()
-				}
-			}
-		}()
-	}
-
-	for ctx.Err() == nil {
-		req, _ := NewRequest("GET", ts.URL, nil)
-		if res, err := client.Do(req); err != nil {
-			t.Errorf("unexpected: %p %v", req, err)
-			break
-		} else {
+	wg.Add(1)
+	putidlec := make(chan chan struct{})
+	go func() {
+		defer wg.Done()
+		ctx := httptrace.WithClientTrace(context.Background(), &httptrace.ClientTrace{
+			PutIdleConn: func(error) {
+				// Signal that the idle conn has been returned to the pool,
+				// and wait for the order to proceed.
+				ch := make(chan struct{})
+				putidlec <- ch
+				<-ch
+			},
+		})
+		req, _ := NewRequestWithContext(ctx, "GET", ts.URL, nil)
+		res, err := client.Do(req)
+		if err == nil {
 			res.Body.Close()
 		}
-	}
+		if err != nil {
+			t.Errorf("request 1: got err %v, want nil", err)
+		}
+	}()
 
+	// Wait for the first request to receive a response and return the
+	// connection to the idle pool.
+	r1c := <-reqc
+	close(r1c)
+	idlec := <-putidlec
+
+	wg.Add(1)
+	cancelctx, cancel := context.WithCancel(context.Background())
+	go func() {
+		defer wg.Done()
+		req, _ := NewRequestWithContext(cancelctx, "GET", ts.URL, nil)
+		res, err := client.Do(req)
+		if err == nil {
+			res.Body.Close()
+		}
+		if !errors.Is(err, context.Canceled) {
+			t.Errorf("request 2: got err %v, want Canceled", err)
+		}
+	}()
+
+	// Wait for the second request to arrive at the server, and then cancel
+	// the request context.
+	r2c := <-reqc
 	cancel()
+
+	// Give the cancelation a moment to take effect, and then unblock the first request.
+	time.Sleep(1 * time.Millisecond)
+	close(idlec)
+
+	close(r2c)
 	wg.Wait()
 }
diff --git a/src/os/exec/lp_windows_test.go b/src/os/exec/lp_windows_test.go
index f834ffe..bbf6a9b 100644
--- a/src/os/exec/lp_windows_test.go
+++ b/src/os/exec/lp_windows_test.go
@@ -312,9 +312,6 @@
 	// Run all tests.
 	for i, test := range lookPathTests {
 		t.Run(fmt.Sprint(i), func(t *testing.T) {
-			if i == 16 {
-				t.Skip("golang.org/issue/44379")
-			}
 			dir := filepath.Join(tmp, "d"+strconv.Itoa(i))
 			err := os.Mkdir(dir, 0700)
 			if err != nil {
diff --git a/src/reflect/all_test.go b/src/reflect/all_test.go
index 0db5e13..eac27e8 100644
--- a/src/reflect/all_test.go
+++ b/src/reflect/all_test.go
@@ -4304,6 +4304,9 @@
 
 		// vout1 represents the in value converted to the in type.
 		v1 := tt.in
+		if !v1.CanConvert(t1) {
+			t.Errorf("ValueOf(%T(%[1]v)).CanConvert(%s) = false, want true", tt.in.Interface(), t1)
+		}
 		vout1 := v1.Convert(t1)
 		out1 := vout1.Interface()
 		if vout1.Type() != tt.in.Type() || !DeepEqual(out1, tt.in.Interface()) {
@@ -4311,6 +4314,9 @@
 		}
 
 		// vout2 represents the in value converted to the out type.
+		if !v1.CanConvert(t2) {
+			t.Errorf("ValueOf(%T(%[1]v)).CanConvert(%s) = false, want true", tt.in.Interface(), t2)
+		}
 		vout2 := v1.Convert(t2)
 		out2 := vout2.Interface()
 		if vout2.Type() != tt.out.Type() || !DeepEqual(out2, tt.out.Interface()) {
@@ -4371,6 +4377,9 @@
 	if !v.Type().ConvertibleTo(pt) {
 		t.Errorf("[]byte should be convertible to *[8]byte")
 	}
+	if v.CanConvert(pt) {
+		t.Errorf("slice with length 4 should not be convertible to *[8]byte")
+	}
 	shouldPanic("reflect: cannot convert slice with length 4 to pointer to array with length 8", func() {
 		_ = v.Convert(pt)
 	})
diff --git a/src/reflect/value.go b/src/reflect/value.go
index 9dce251..6f878eb 100644
--- a/src/reflect/value.go
+++ b/src/reflect/value.go
@@ -2811,6 +2811,26 @@
 	return op(v, t)
 }
 
+// CanConvert reports whether the value v can be converted to type t.
+// If v.CanConvert(t) returns true then v.Convert(t) will not panic.
+func (v Value) CanConvert(t Type) bool {
+	vt := v.Type()
+	if !vt.ConvertibleTo(t) {
+		return false
+	}
+	// Currently the only conversion that is OK in terms of type
+	// but that can panic depending on the value is converting
+	// from slice to pointer-to-array.
+	if vt.Kind() == Slice && t.Kind() == Ptr && t.Elem().Kind() == Array {
+		n := t.Elem().Len()
+		h := (*unsafeheader.Slice)(v.ptr)
+		if n > h.Len {
+			return false
+		}
+	}
+	return true
+}
+
 // convertOp returns the function to convert a value of type src
 // to a value of type dst. If the conversion is illegal, convertOp returns nil.
 func convertOp(dst, src *rtype) func(Value, Type) Value {
diff --git a/src/reflect/visiblefields.go b/src/reflect/visiblefields.go
index c068979..1a2b535 100644
--- a/src/reflect/visiblefields.go
+++ b/src/reflect/visiblefields.go
@@ -1,3 +1,7 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
 package reflect
 
 // VisibleFields returns all the visible fields in t, which must be a
diff --git a/src/reflect/visiblefields_test.go b/src/reflect/visiblefields_test.go
index 2688b63..915bbee 100644
--- a/src/reflect/visiblefields_test.go
+++ b/src/reflect/visiblefields_test.go
@@ -1,3 +1,7 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
 package reflect_test
 
 import (
diff --git a/src/runtime/cgo/gcc_traceback.c b/src/runtime/cgo/gcc_traceback.c
index d86331c..6e9470c 100644
--- a/src/runtime/cgo/gcc_traceback.c
+++ b/src/runtime/cgo/gcc_traceback.c
@@ -7,6 +7,14 @@
 #include <stdint.h>
 #include "libcgo.h"
 
+#ifndef __has_feature
+#define __has_feature(x) 0
+#endif
+
+#if __has_feature(memory_sanitizer)
+#include <sanitizer/msan_interface.h>
+#endif
+
 // Call the user's traceback function and then call sigtramp.
 // The runtime signal handler will jump to this code.
 // We do it this way so that the user's traceback function will be called
@@ -19,6 +27,18 @@
 	arg.SigContext = (uintptr_t)(context);
 	arg.Buf = cgoCallers;
 	arg.Max = 32; // must match len(runtime.cgoCallers)
+
+#if __has_feature(memory_sanitizer)
+        // This function is called directly from the signal handler.
+        // The arguments are passed in registers, so whether msan
+        // considers cgoCallers to be initialized depends on whether
+        // it considers the appropriate register to be initialized.
+        // That can cause false reports in rare cases.
+        // Explicitly unpoison the memory to avoid that.
+        // See issue #47543 for more details.
+        __msan_unpoison(&arg, sizeof arg);
+#endif
+
 	(*cgoTraceback)(&arg);
 	sigtramp(sig, info, context);
 }
diff --git a/src/runtime/cgocall.go b/src/runtime/cgocall.go
index 8ffb48a..2626216 100644
--- a/src/runtime/cgocall.go
+++ b/src/runtime/cgocall.go
@@ -212,6 +212,8 @@
 	// a different M. The call to unlockOSThread is in unwindm.
 	lockOSThread()
 
+	checkm := gp.m
+
 	// Save current syscall parameters, so m.syscall can be
 	// used again if callback decide to make syscall.
 	syscall := gp.m.syscall
@@ -227,15 +229,20 @@
 
 	osPreemptExtExit(gp.m)
 
-	cgocallbackg1(fn, frame, ctxt)
+	cgocallbackg1(fn, frame, ctxt) // will call unlockOSThread
 
 	// At this point unlockOSThread has been called.
 	// The following code must not change to a different m.
 	// This is enforced by checking incgo in the schedule function.
 
+	gp.m.incgo = true
+
+	if gp.m != checkm {
+		throw("m changed unexpectedly in cgocallbackg")
+	}
+
 	osPreemptExtEnter(gp.m)
 
-	gp.m.incgo = true
 	// going back to cgo call
 	reentersyscall(savedpc, uintptr(savedsp))
 
@@ -244,6 +251,11 @@
 
 func cgocallbackg1(fn, frame unsafe.Pointer, ctxt uintptr) {
 	gp := getg()
+
+	// When we return, undo the call to lockOSThread in cgocallbackg.
+	// We must still stay on the same m.
+	defer unlockOSThread()
+
 	if gp.m.needextram || atomic.Load(&extraMWaiters) > 0 {
 		gp.m.needextram = false
 		systemstack(newextram)
@@ -323,10 +335,6 @@
 
 		releasem(mp)
 	}
-
-	// Undo the call to lockOSThread in cgocallbackg.
-	// We must still stay on the same m.
-	unlockOSThread()
 }
 
 // called from assembly
diff --git a/src/runtime/checkptr.go b/src/runtime/checkptr.go
index d429508..2d4afd5 100644
--- a/src/runtime/checkptr.go
+++ b/src/runtime/checkptr.go
@@ -7,6 +7,11 @@
 import "unsafe"
 
 func checkptrAlignment(p unsafe.Pointer, elem *_type, n uintptr) {
+	// nil pointer is always suitably aligned (#47430).
+	if p == nil {
+		return
+	}
+
 	// Check that (*[n]elem)(p) is appropriately aligned.
 	// Note that we allow unaligned pointers if the types they point to contain
 	// no pointers themselves. See issue 37298.
@@ -29,10 +34,12 @@
 		return false
 	}
 
-	end := add(ptr, size-1)
-	if uintptr(end) < uintptr(ptr) {
+	// Check that add(ptr, size-1) won't overflow. This avoids the risk
+	// of producing an illegal pointer value (assuming ptr is legal).
+	if uintptr(ptr) >= -(size - 1) {
 		return true
 	}
+	end := add(ptr, size-1)
 
 	// TODO(mdempsky): Detect when [ptr, end] contains Go allocations,
 	// but neither ptr nor end point into one themselves.
diff --git a/src/runtime/checkptr_test.go b/src/runtime/checkptr_test.go
index 2a5c364..d5dd101 100644
--- a/src/runtime/checkptr_test.go
+++ b/src/runtime/checkptr_test.go
@@ -26,6 +26,7 @@
 	}{
 		{"CheckPtrAlignmentPtr", "fatal error: checkptr: misaligned pointer conversion\n"},
 		{"CheckPtrAlignmentNoPtr", ""},
+		{"CheckPtrAlignmentNilPtr", ""},
 		{"CheckPtrArithmetic", "fatal error: checkptr: pointer arithmetic result points to invalid allocation\n"},
 		{"CheckPtrArithmetic2", "fatal error: checkptr: pointer arithmetic result points to invalid allocation\n"},
 		{"CheckPtrSize", "fatal error: checkptr: converted pointer straddles multiple allocations\n"},
diff --git a/src/runtime/crash_cgo_test.go b/src/runtime/crash_cgo_test.go
index 7d25c51..5729942 100644
--- a/src/runtime/crash_cgo_test.go
+++ b/src/runtime/crash_cgo_test.go
@@ -282,6 +282,15 @@
 	}
 }
 
+func TestCgoTracebackContextPreemption(t *testing.T) {
+	t.Parallel()
+	got := runTestProg(t, "testprogcgo", "TracebackContextPreemption")
+	want := "OK\n"
+	if got != want {
+		t.Errorf("expected %q got %v", want, got)
+	}
+}
+
 func testCgoPprof(t *testing.T, buildArg, runArg, top, bottom string) {
 	t.Parallel()
 	if runtime.GOOS != "linux" || (runtime.GOARCH != "amd64" && runtime.GOARCH != "ppc64le") {
diff --git a/src/runtime/debug/panic_test.go b/src/runtime/debug/panic_test.go
index b93631e..65f9555 100644
--- a/src/runtime/debug/panic_test.go
+++ b/src/runtime/debug/panic_test.go
@@ -24,6 +24,9 @@
 	if runtime.GOOS == "ios" {
 		t.Skip("iOS doesn't provide fault addresses")
 	}
+	if runtime.GOOS == "netbsd" && runtime.GOARCH == "arm" {
+		t.Skip("netbsd-arm doesn't provide fault address (golang.org/issue/45026)")
+	}
 	m, err := syscall.Mmap(-1, 0, 0x1000, syscall.PROT_READ /* Note: no PROT_WRITE */, syscall.MAP_SHARED|syscall.MAP_ANON)
 	if err != nil {
 		t.Fatalf("can't map anonymous memory: %s", err)
diff --git a/src/runtime/export_debug_regabiargs_off_test.go b/src/runtime/export_debug_regabiargs_off_test.go
index fce37ab..5009003 100644
--- a/src/runtime/export_debug_regabiargs_off_test.go
+++ b/src/runtime/export_debug_regabiargs_off_test.go
@@ -3,8 +3,7 @@
 // license that can be found in the LICENSE file.
 
 //go:build amd64 && linux && !goexperiment.regabiargs
-// +build amd64,linux
-// +build !goexperiment.regabiargs
+// +build amd64,linux,!goexperiment.regabiargs
 
 package runtime
 
diff --git a/src/runtime/export_debug_regabiargs_on_test.go b/src/runtime/export_debug_regabiargs_on_test.go
index 3c65127..e1b72ef 100644
--- a/src/runtime/export_debug_regabiargs_on_test.go
+++ b/src/runtime/export_debug_regabiargs_on_test.go
@@ -3,8 +3,7 @@
 // license that can be found in the LICENSE file.
 
 //go:build amd64 && linux && goexperiment.regabiargs
-// +build amd64,linux
-// +build goexperiment.regabiargs
+// +build amd64,linux,goexperiment.regabiargs
 
 package runtime
 
diff --git a/src/runtime/internal/sys/zgoarch_386.go b/src/runtime/internal/sys/zgoarch_386.go
index 98a2401..5b189e7 100644
--- a/src/runtime/internal/sys/zgoarch_386.go
+++ b/src/runtime/internal/sys/zgoarch_386.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 0
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 0
 const GoarchMips64 = 0
diff --git a/src/runtime/internal/sys/zgoarch_amd64.go b/src/runtime/internal/sys/zgoarch_amd64.go
index d8faa5c..312977d 100644
--- a/src/runtime/internal/sys/zgoarch_amd64.go
+++ b/src/runtime/internal/sys/zgoarch_amd64.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 0
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 0
 const GoarchMips64 = 0
diff --git a/src/runtime/internal/sys/zgoarch_arm.go b/src/runtime/internal/sys/zgoarch_arm.go
index b64a69c..5781870 100644
--- a/src/runtime/internal/sys/zgoarch_arm.go
+++ b/src/runtime/internal/sys/zgoarch_arm.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 0
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 0
 const GoarchMips64 = 0
diff --git a/src/runtime/internal/sys/zgoarch_arm64.go b/src/runtime/internal/sys/zgoarch_arm64.go
index de6f853..f72a1f2 100644
--- a/src/runtime/internal/sys/zgoarch_arm64.go
+++ b/src/runtime/internal/sys/zgoarch_arm64.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 0
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 0
 const GoarchMips64 = 0
diff --git a/src/runtime/internal/sys/zgoarch_arm64be.go b/src/runtime/internal/sys/zgoarch_arm64be.go
index b762bb0..e805646 100644
--- a/src/runtime/internal/sys/zgoarch_arm64be.go
+++ b/src/runtime/internal/sys/zgoarch_arm64be.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 1
 const GoarchPpc64 = 0
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 0
 const GoarchMips64 = 0
diff --git a/src/runtime/internal/sys/zgoarch_armbe.go b/src/runtime/internal/sys/zgoarch_armbe.go
index e5297e4..d8d4e56 100644
--- a/src/runtime/internal/sys/zgoarch_armbe.go
+++ b/src/runtime/internal/sys/zgoarch_armbe.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 0
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 0
 const GoarchMips64 = 0
diff --git a/src/runtime/internal/sys/zgoarch_loong64.go b/src/runtime/internal/sys/zgoarch_loong64.go
new file mode 100644
index 0000000..6f35eb4
--- /dev/null
+++ b/src/runtime/internal/sys/zgoarch_loong64.go
@@ -0,0 +1,33 @@
+// Code generated by gengoos.go using 'go generate'. DO NOT EDIT.
+
+//go:build loong64
+// +build loong64
+
+package sys
+
+const GOARCH = `loong64`
+
+const Goarch386 = 0
+const GoarchAmd64 = 0
+const GoarchAmd64p32 = 0
+const GoarchArm = 0
+const GoarchArmbe = 0
+const GoarchArm64 = 0
+const GoarchArm64be = 0
+const GoarchPpc64 = 0
+const GoarchPpc64le = 0
+const GoarchLoong64 = 1
+const GoarchMips = 0
+const GoarchMipsle = 0
+const GoarchMips64 = 0
+const GoarchMips64le = 0
+const GoarchMips64p32 = 0
+const GoarchMips64p32le = 0
+const GoarchPpc = 0
+const GoarchRiscv = 0
+const GoarchRiscv64 = 0
+const GoarchS390 = 0
+const GoarchS390x = 0
+const GoarchSparc = 0
+const GoarchSparc64 = 0
+const GoarchWasm = 0
diff --git a/src/runtime/internal/sys/zgoarch_mips.go b/src/runtime/internal/sys/zgoarch_mips.go
index b5f4ed3..bd58a92 100644
--- a/src/runtime/internal/sys/zgoarch_mips.go
+++ b/src/runtime/internal/sys/zgoarch_mips.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 0
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 1
 const GoarchMipsle = 0
 const GoarchMips64 = 0
diff --git a/src/runtime/internal/sys/zgoarch_mips64.go b/src/runtime/internal/sys/zgoarch_mips64.go
index 73777cc..8e4a3dc 100644
--- a/src/runtime/internal/sys/zgoarch_mips64.go
+++ b/src/runtime/internal/sys/zgoarch_mips64.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 0
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 0
 const GoarchMips64 = 1
diff --git a/src/runtime/internal/sys/zgoarch_mips64le.go b/src/runtime/internal/sys/zgoarch_mips64le.go
index 0c81c36..d8e0033 100644
--- a/src/runtime/internal/sys/zgoarch_mips64le.go
+++ b/src/runtime/internal/sys/zgoarch_mips64le.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 0
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 0
 const GoarchMips64 = 0
diff --git a/src/runtime/internal/sys/zgoarch_mips64p32.go b/src/runtime/internal/sys/zgoarch_mips64p32.go
index d63ce27..8549cc0 100644
--- a/src/runtime/internal/sys/zgoarch_mips64p32.go
+++ b/src/runtime/internal/sys/zgoarch_mips64p32.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 0
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 0
 const GoarchMips64 = 0
diff --git a/src/runtime/internal/sys/zgoarch_mips64p32le.go b/src/runtime/internal/sys/zgoarch_mips64p32le.go
index 2d57789..667b6fe 100644
--- a/src/runtime/internal/sys/zgoarch_mips64p32le.go
+++ b/src/runtime/internal/sys/zgoarch_mips64p32le.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 0
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 0
 const GoarchMips64 = 0
diff --git a/src/runtime/internal/sys/zgoarch_mipsle.go b/src/runtime/internal/sys/zgoarch_mipsle.go
index 8af919d..8bedb2b 100644
--- a/src/runtime/internal/sys/zgoarch_mipsle.go
+++ b/src/runtime/internal/sys/zgoarch_mipsle.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 0
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 1
 const GoarchMips64 = 0
diff --git a/src/runtime/internal/sys/zgoarch_ppc.go b/src/runtime/internal/sys/zgoarch_ppc.go
index f6f12a5..fe2196a 100644
--- a/src/runtime/internal/sys/zgoarch_ppc.go
+++ b/src/runtime/internal/sys/zgoarch_ppc.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 0
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 0
 const GoarchMips64 = 0
diff --git a/src/runtime/internal/sys/zgoarch_ppc64.go b/src/runtime/internal/sys/zgoarch_ppc64.go
index a837960..bd7cc43 100644
--- a/src/runtime/internal/sys/zgoarch_ppc64.go
+++ b/src/runtime/internal/sys/zgoarch_ppc64.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 1
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 0
 const GoarchMips64 = 0
diff --git a/src/runtime/internal/sys/zgoarch_ppc64le.go b/src/runtime/internal/sys/zgoarch_ppc64le.go
index f2ec5dc..e101892 100644
--- a/src/runtime/internal/sys/zgoarch_ppc64le.go
+++ b/src/runtime/internal/sys/zgoarch_ppc64le.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 0
 const GoarchPpc64le = 1
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 0
 const GoarchMips64 = 0
diff --git a/src/runtime/internal/sys/zgoarch_riscv.go b/src/runtime/internal/sys/zgoarch_riscv.go
index 83a3312..559f860 100644
--- a/src/runtime/internal/sys/zgoarch_riscv.go
+++ b/src/runtime/internal/sys/zgoarch_riscv.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 0
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 0
 const GoarchMips64 = 0
diff --git a/src/runtime/internal/sys/zgoarch_riscv64.go b/src/runtime/internal/sys/zgoarch_riscv64.go
index 1dfcc84..8485a94 100644
--- a/src/runtime/internal/sys/zgoarch_riscv64.go
+++ b/src/runtime/internal/sys/zgoarch_riscv64.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 0
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 0
 const GoarchMips64 = 0
diff --git a/src/runtime/internal/sys/zgoarch_s390.go b/src/runtime/internal/sys/zgoarch_s390.go
index 91aba5a..4c4569e 100644
--- a/src/runtime/internal/sys/zgoarch_s390.go
+++ b/src/runtime/internal/sys/zgoarch_s390.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 0
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 0
 const GoarchMips64 = 0
diff --git a/src/runtime/internal/sys/zgoarch_s390x.go b/src/runtime/internal/sys/zgoarch_s390x.go
index edce502..e50d2ed 100644
--- a/src/runtime/internal/sys/zgoarch_s390x.go
+++ b/src/runtime/internal/sys/zgoarch_s390x.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 0
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 0
 const GoarchMips64 = 0
diff --git a/src/runtime/internal/sys/zgoarch_sparc.go b/src/runtime/internal/sys/zgoarch_sparc.go
index 5ae9560..0d08752 100644
--- a/src/runtime/internal/sys/zgoarch_sparc.go
+++ b/src/runtime/internal/sys/zgoarch_sparc.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 0
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 0
 const GoarchMips64 = 0
diff --git a/src/runtime/internal/sys/zgoarch_sparc64.go b/src/runtime/internal/sys/zgoarch_sparc64.go
index e2a0134..ba405bb 100644
--- a/src/runtime/internal/sys/zgoarch_sparc64.go
+++ b/src/runtime/internal/sys/zgoarch_sparc64.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 0
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 0
 const GoarchMips64 = 0
diff --git a/src/runtime/internal/sys/zgoarch_wasm.go b/src/runtime/internal/sys/zgoarch_wasm.go
index 52e85de..7c3e5af 100644
--- a/src/runtime/internal/sys/zgoarch_wasm.go
+++ b/src/runtime/internal/sys/zgoarch_wasm.go
@@ -16,6 +16,7 @@
 const GoarchArm64be = 0
 const GoarchPpc64 = 0
 const GoarchPpc64le = 0
+const GoarchLoong64 = 0
 const GoarchMips = 0
 const GoarchMipsle = 0
 const GoarchMips64 = 0
diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go
index 2759bbd..cc22b0f 100644
--- a/src/runtime/malloc.go
+++ b/src/runtime/malloc.go
@@ -1135,13 +1135,21 @@
 		msanmalloc(x, size)
 	}
 
+	if rate := MemProfileRate; rate > 0 {
+		// Note cache c only valid while m acquired; see #47302
+		if rate != 1 && size < c.nextSample {
+			c.nextSample -= size
+		} else {
+			profilealloc(mp, x, size)
+		}
+	}
 	mp.mallocing = 0
 	releasem(mp)
 
 	// Pointerfree data can be zeroed late in a context where preemption can occur.
 	// x will keep the memory alive.
 	if !isZeroed && needzero {
-		memclrNoHeapPointersChunked(size, x)
+		memclrNoHeapPointersChunked(size, x) // This is a possible preemption point: see #47302
 	}
 
 	if debug.malloc {
@@ -1155,16 +1163,6 @@
 		}
 	}
 
-	if rate := MemProfileRate; rate > 0 {
-		if rate != 1 && size < c.nextSample {
-			c.nextSample -= size
-		} else {
-			mp := acquirem()
-			profilealloc(mp, x, size)
-			releasem(mp)
-		}
-	}
-
 	if assistG != nil {
 		// Account for internal fragmentation in the assist
 		// debt now that we know it.
diff --git a/src/runtime/mfinal.go b/src/runtime/mfinal.go
index fd318d4..c134a0f 100644
--- a/src/runtime/mfinal.go
+++ b/src/runtime/mfinal.go
@@ -466,6 +466,10 @@
 // Without the KeepAlive call, the finalizer could run at the start of
 // syscall.Read, closing the file descriptor before syscall.Read makes
 // the actual system call.
+//
+// Note: KeepAlive should only be used to prevent finalizers from
+// running prematurely. In particular, when used with unsafe.Pointer,
+// the rules for valid uses of unsafe.Pointer still apply.
 func KeepAlive(x interface{}) {
 	// Introduce a use of x that the compiler can't eliminate.
 	// This makes sure x is alive on entry. We need x to be alive
diff --git a/src/runtime/proc.go b/src/runtime/proc.go
index 81758ac..8ec06df 100644
--- a/src/runtime/proc.go
+++ b/src/runtime/proc.go
@@ -4686,7 +4686,7 @@
 		return
 	}
 
-	// On mips{,le}, 64bit atomics are emulated with spinlocks, in
+	// On mips{,le}/arm, 64bit atomics are emulated with spinlocks, in
 	// runtime/internal/atomic. If SIGPROF arrives while the program is inside
 	// the critical section, it creates a deadlock (when writing the sample).
 	// As a workaround, create a counter of SIGPROFs while in critical section
@@ -4699,6 +4699,13 @@
 				return
 			}
 		}
+		if GOARCH == "arm" && goarm < 7 && GOOS == "linux" && pc&0xffff0000 == 0xffff0000 {
+			// runtime/internal/atomic functions call into kernel
+			// helpers on arm < 7. See
+			// runtime/internal/atomic/sys_linux_arm.s.
+			cpuprof.lostAtomic++
+			return
+		}
 	}
 
 	// Profiling runs concurrently with GC, so it must not allocate.
@@ -4919,7 +4926,6 @@
 		moveTimers(plocal, pp.timers)
 		pp.timers = nil
 		pp.numTimers = 0
-		pp.adjustTimers = 0
 		pp.deletedTimers = 0
 		atomic.Store64(&pp.timer0When, 0)
 		unlock(&pp.timersLock)
diff --git a/src/runtime/race.go b/src/runtime/race.go
index cc8c5db..ce6b5b5 100644
--- a/src/runtime/race.go
+++ b/src/runtime/race.go
@@ -343,7 +343,7 @@
 func racewriterangepc1(addr, size, pc uintptr)
 func racecallbackthunk(uintptr)
 
-// racecall allows calling an arbitrary function f from C race runtime
+// racecall allows calling an arbitrary function fn from C race runtime
 // with up to 4 uintptr arguments.
 func racecall(fn *byte, arg0, arg1, arg2, arg3 uintptr)
 
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go
index 2a66826..5051ec4 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -681,7 +681,7 @@
 	// timerModifiedEarlier status. Because the timer may have been
 	// modified again, there need not be any timer with this value.
 	// This is updated using atomic functions.
-	// This is 0 if the value is unknown.
+	// This is 0 if there are no timerModifiedEarlier timers.
 	timerModifiedEarliest uint64
 
 	// Per-P GC state
@@ -727,12 +727,6 @@
 	// Modified using atomic instructions.
 	numTimers uint32
 
-	// Number of timerModifiedEarlier timers on P's heap.
-	// This should only be modified while holding timersLock,
-	// or while the timer status is in a transient state
-	// such as timerModifying.
-	adjustTimers uint32
-
 	// Number of timerDeleted timers in P's heap.
 	// Modified using atomic instructions.
 	deletedTimers uint32
diff --git a/src/runtime/signal_windows.go b/src/runtime/signal_windows.go
index f2ce24d..b720ddc 100644
--- a/src/runtime/signal_windows.go
+++ b/src/runtime/signal_windows.go
@@ -183,6 +183,17 @@
 		return _EXCEPTION_CONTINUE_SEARCH
 	}
 
+	// VEH is called before SEH, but arm64 MSVC DLLs use SEH to trap
+	// illegal instructions during runtime initialization to determine
+	// CPU features, so if we make it to the last handler and we're
+	// arm64 and it's an illegal instruction and this is coming from
+	// non-Go code, then assume it's this runtime probing happen, and
+	// pass that onward to SEH.
+	if GOARCH == "arm64" && info.exceptioncode == _EXCEPTION_ILLEGAL_INSTRUCTION &&
+		(r.ip() < firstmoduledata.text || firstmoduledata.etext < r.ip()) {
+		return _EXCEPTION_CONTINUE_SEARCH
+	}
+
 	winthrow(info, r, gp)
 	return 0 // not reached
 }
diff --git a/src/runtime/testdata/testprog/checkptr.go b/src/runtime/testdata/testprog/checkptr.go
index f76b64a..9c55613 100644
--- a/src/runtime/testdata/testprog/checkptr.go
+++ b/src/runtime/testdata/testprog/checkptr.go
@@ -4,11 +4,16 @@
 
 package main
 
-import "unsafe"
+import (
+	"runtime"
+	"time"
+	"unsafe"
+)
 
 func init() {
 	register("CheckPtrAlignmentNoPtr", CheckPtrAlignmentNoPtr)
 	register("CheckPtrAlignmentPtr", CheckPtrAlignmentPtr)
+	register("CheckPtrAlignmentNilPtr", CheckPtrAlignmentNilPtr)
 	register("CheckPtrArithmetic", CheckPtrArithmetic)
 	register("CheckPtrArithmetic2", CheckPtrArithmetic2)
 	register("CheckPtrSize", CheckPtrSize)
@@ -29,6 +34,35 @@
 	sink2 = (**int64)(unsafe.Pointer(uintptr(p) + 1))
 }
 
+// CheckPtrAlignmentNilPtr tests that checkptrAlignment doesn't crash
+// on nil pointers (#47430).
+func CheckPtrAlignmentNilPtr() {
+	var do func(int)
+	do = func(n int) {
+		// Inflate the stack so runtime.shrinkstack gets called during GC
+		if n > 0 {
+			do(n - 1)
+		}
+
+		var p unsafe.Pointer
+		_ = (*int)(p)
+	}
+
+	go func() {
+		for {
+			runtime.GC()
+		}
+	}()
+
+	go func() {
+		for i := 0; ; i++ {
+			do(i % 1024)
+		}
+	}()
+
+	time.Sleep(time.Second)
+}
+
 func CheckPtrArithmetic() {
 	var x int
 	i := uintptr(unsafe.Pointer(&x))
diff --git a/src/runtime/testdata/testprogcgo/tracebackctxt.go b/src/runtime/testdata/testprogcgo/tracebackctxt.go
index 51fa4ad..62ff8ec 100644
--- a/src/runtime/testdata/testprogcgo/tracebackctxt.go
+++ b/src/runtime/testdata/testprogcgo/tracebackctxt.go
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The __attribute__((weak)) used below doesn't seem to work on Windows.
-
 package main
 
 // Test the context argument to SetCgoTraceback.
@@ -14,20 +12,24 @@
 extern void C1(void);
 extern void C2(void);
 extern void tcContext(void*);
+extern void tcContextSimple(void*);
 extern void tcTraceback(void*);
 extern void tcSymbolizer(void*);
 extern int getContextCount(void);
+extern void TracebackContextPreemptionCallGo(int);
 */
 import "C"
 
 import (
 	"fmt"
 	"runtime"
+	"sync"
 	"unsafe"
 )
 
 func init() {
 	register("TracebackContext", TracebackContext)
+	register("TracebackContextPreemption", TracebackContextPreemption)
 }
 
 var tracebackOK bool
@@ -105,3 +107,30 @@
 		tracebackOK = false
 	}
 }
+
+// Issue 47441.
+func TracebackContextPreemption() {
+	runtime.SetCgoTraceback(0, unsafe.Pointer(C.tcTraceback), unsafe.Pointer(C.tcContextSimple), unsafe.Pointer(C.tcSymbolizer))
+
+	const funcs = 10
+	const calls = 1e5
+	var wg sync.WaitGroup
+	for i := 0; i < funcs; i++ {
+		wg.Add(1)
+		go func(i int) {
+			defer wg.Done()
+			for j := 0; j < calls; j++ {
+				C.TracebackContextPreemptionCallGo(C.int(i*calls + j))
+			}
+		}(i)
+	}
+	wg.Wait()
+
+	fmt.Println("OK")
+}
+
+//export TracebackContextPreemptionGoFunction
+func TracebackContextPreemptionGoFunction(i C.int) {
+	// Do some busy work.
+	fmt.Sprintf("%d\n", i)
+}
diff --git a/src/runtime/testdata/testprogcgo/tracebackctxt_c.c b/src/runtime/testdata/testprogcgo/tracebackctxt_c.c
index 900cada..910cb7b 100644
--- a/src/runtime/testdata/testprogcgo/tracebackctxt_c.c
+++ b/src/runtime/testdata/testprogcgo/tracebackctxt_c.c
@@ -11,6 +11,7 @@
 // Functions exported from Go.
 extern void G1(void);
 extern void G2(void);
+extern void TracebackContextPreemptionGoFunction(int);
 
 void C1() {
 	G1();
@@ -62,10 +63,17 @@
 	}
 }
 
+void tcContextSimple(void* parg) {
+	struct cgoContextArg* arg = (struct cgoContextArg*)(parg);
+	if (arg->context == 0) {
+		arg->context = 1;
+	}
+}
+
 void tcTraceback(void* parg) {
 	int base, i;
 	struct cgoTracebackArg* arg = (struct cgoTracebackArg*)(parg);
-	if (arg->context == 0) {
+	if (arg->context == 0 && arg->sigContext == 0) {
 		// This shouldn't happen in this program.
 		abort();
 	}
@@ -89,3 +97,7 @@
 	arg->func = "cFunction";
 	arg->lineno = arg->pc + (arg->more << 16);
 }
+
+void TracebackContextPreemptionCallGo(int i) {
+	TracebackContextPreemptionGoFunction(i);
+}
diff --git a/src/runtime/textflag.h b/src/runtime/textflag.h
index e727208..214075e 100644
--- a/src/runtime/textflag.h
+++ b/src/runtime/textflag.h
@@ -32,8 +32,8 @@
 #define NOFRAME 512
 // Function can call reflect.Type.Method or reflect.Type.MethodByName.
 #define REFLECTMETHOD 1024
-// Function is the top of the call stack. Call stack unwinders should stop
-// at this function.
+// Function is the outermost frame of the call stack. Call stack unwinders
+// should stop at this function.
 #define TOPFRAME 2048
 // Function is an ABI wrapper.
 #define ABIWRAPPER 4096
diff --git a/src/runtime/time.go b/src/runtime/time.go
index dee6a67..666b242 100644
--- a/src/runtime/time.go
+++ b/src/runtime/time.go
@@ -333,7 +333,6 @@
 				// Must fetch t.pp before setting status
 				// to timerDeleted.
 				tpp := t.pp.ptr()
-				atomic.Xadd(&tpp.adjustTimers, -1)
 				if !atomic.Cas(&t.status, timerModifying, timerDeleted) {
 					badTimer()
 				}
@@ -510,20 +509,9 @@
 
 		tpp := t.pp.ptr()
 
-		// Update the adjustTimers field.  Subtract one if we
-		// are removing a timerModifiedEarlier, add one if we
-		// are adding a timerModifiedEarlier.
-		adjust := int32(0)
-		if status == timerModifiedEarlier {
-			adjust--
-		}
 		if newStatus == timerModifiedEarlier {
-			adjust++
 			updateTimerModifiedEarliest(tpp, when)
 		}
-		if adjust != 0 {
-			atomic.Xadd(&tpp.adjustTimers, adjust)
-		}
 
 		// Set the new status of the timer.
 		if !atomic.Cas(&t.status, timerModifying, newStatus) {
@@ -591,9 +579,6 @@
 			// Move t to the right position.
 			dodeltimer0(pp)
 			doaddtimer(pp, t)
-			if s == timerModifiedEarlier {
-				atomic.Xadd(&pp.adjustTimers, -1)
-			}
 			if !atomic.Cas(&t.status, timerMoving, timerWaiting) {
 				badTimer()
 			}
@@ -664,37 +649,23 @@
 // it also moves timers that have been modified to run later,
 // and removes deleted timers. The caller must have locked the timers for pp.
 func adjusttimers(pp *p, now int64) {
-	if atomic.Load(&pp.adjustTimers) == 0 {
-		if verifyTimers {
-			verifyTimerHeap(pp)
-		}
-		// There are no timers to adjust, so it is safe to clear
-		// timerModifiedEarliest. Do so in case it is stale.
-		// Everything will work if we don't do this,
-		// but clearing here may save future calls to adjusttimers.
-		atomic.Store64(&pp.timerModifiedEarliest, 0)
-		return
-	}
-
 	// If we haven't yet reached the time of the first timerModifiedEarlier
 	// timer, don't do anything. This speeds up programs that adjust
 	// a lot of timers back and forth if the timers rarely expire.
 	// We'll postpone looking through all the adjusted timers until
 	// one would actually expire.
-	if first := atomic.Load64(&pp.timerModifiedEarliest); first != 0 {
-		if int64(first) > now {
-			if verifyTimers {
-				verifyTimerHeap(pp)
-			}
-			return
+	first := atomic.Load64(&pp.timerModifiedEarliest)
+	if first == 0 || int64(first) > now {
+		if verifyTimers {
+			verifyTimerHeap(pp)
 		}
-
-		// We are going to clear all timerModifiedEarlier timers.
-		atomic.Store64(&pp.timerModifiedEarliest, 0)
+		return
 	}
 
+	// We are going to clear all timerModifiedEarlier timers.
+	atomic.Store64(&pp.timerModifiedEarliest, 0)
+
 	var moved []*timer
-loop:
 	for i := 0; i < len(pp.timers); i++ {
 		t := pp.timers[i]
 		if t.pp.ptr() != pp {
@@ -721,11 +692,6 @@
 				// loop to skip some other timer.
 				dodeltimer(pp, i)
 				moved = append(moved, t)
-				if s == timerModifiedEarlier {
-					if n := atomic.Xadd(&pp.adjustTimers, -1); int32(n) <= 0 {
-						break loop
-					}
-				}
 				// Look at this heap position again.
 				i--
 			}
@@ -824,9 +790,6 @@
 			t.when = t.nextwhen
 			dodeltimer0(pp)
 			doaddtimer(pp, t)
-			if s == timerModifiedEarlier {
-				atomic.Xadd(&pp.adjustTimers, -1)
-			}
 			if !atomic.Cas(&t.status, timerMoving, timerWaiting) {
 				badTimer()
 			}
@@ -921,7 +884,6 @@
 	atomic.Store64(&pp.timerModifiedEarliest, 0)
 
 	cdel := int32(0)
-	cearlier := int32(0)
 	to := 0
 	changedHeap := false
 	timers := pp.timers
@@ -946,9 +908,6 @@
 					if !atomic.Cas(&t.status, timerMoving, timerWaiting) {
 						badTimer()
 					}
-					if s == timerModifiedEarlier {
-						cearlier++
-					}
 					continue nextTimer
 				}
 			case timerDeleted:
@@ -985,7 +944,6 @@
 
 	atomic.Xadd(&pp.deletedTimers, -cdel)
 	atomic.Xadd(&pp.numTimers, -cdel)
-	atomic.Xadd(&pp.adjustTimers, -cearlier)
 
 	timers = timers[:to]
 	pp.timers = timers
diff --git a/src/runtime/traceback_test.go b/src/runtime/traceback_test.go
index 2a0497e..83b86a7 100644
--- a/src/runtime/traceback_test.go
+++ b/src/runtime/traceback_test.go
@@ -19,8 +19,8 @@
 	}{
 		// simple ints
 		{
-			func() int { return testTracebackArgs1(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12) },
-			"testTracebackArgs1(0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, ...)",
+			func() int { return testTracebackArgs1(1, 2, 3, 4, 5) },
+			"testTracebackArgs1(0x1, 0x2, 0x3, 0x4, 0x5)",
 		},
 		// some aggregates
 		{
@@ -53,6 +53,58 @@
 			},
 			"testTracebackArgs5(0x0, {0x1, {}, {{}, {}}}, {}, {}, {}, {}, {}, ...)",
 		},
+
+		// edge cases for ...
+		// no ... for 10 args
+		{
+			func() int { return testTracebackArgs6a(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) },
+			"testTracebackArgs6a(0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa)",
+		},
+		// has ... for 11 args
+		{
+			func() int { return testTracebackArgs6b(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) },
+			"testTracebackArgs6b(0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, ...)",
+		},
+		// no ... for aggregates with 10 words
+		{
+			func() int { return testTracebackArgs7a([10]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) },
+			"testTracebackArgs7a({0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa})",
+		},
+		// has ... for aggregates with 11 words
+		{
+			func() int { return testTracebackArgs7b([11]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}) },
+			"testTracebackArgs7b({0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, ...})",
+		},
+		// no ... for aggregates, but with more args
+		{
+			func() int { return testTracebackArgs7c([10]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 11) },
+			"testTracebackArgs7c({0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa}, ...)",
+		},
+		// has ... for aggregates and also for more args
+		{
+			func() int { return testTracebackArgs7d([11]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, 12) },
+			"testTracebackArgs7d({0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, ...}, ...)",
+		},
+		// nested aggregates, no ...
+		{
+			func() int { return testTracebackArgs8a(testArgsType8a{1, 2, 3, 4, 5, 6, 7, 8, [2]int{9, 10}}) },
+			"testTracebackArgs8a({0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, {0x9, 0xa}})",
+		},
+		// nested aggregates, ... in inner but not outer
+		{
+			func() int { return testTracebackArgs8b(testArgsType8b{1, 2, 3, 4, 5, 6, 7, 8, [3]int{9, 10, 11}}) },
+			"testTracebackArgs8b({0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, {0x9, 0xa, ...}})",
+		},
+		// nested aggregates, ... in outer but not inner
+		{
+			func() int { return testTracebackArgs8c(testArgsType8c{1, 2, 3, 4, 5, 6, 7, 8, [2]int{9, 10}, 11}) },
+			"testTracebackArgs8c({0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, {0x9, 0xa}, ...})",
+		},
+		// nested aggregates, ... in both inner and outer
+		{
+			func() int { return testTracebackArgs8d(testArgsType8d{1, 2, 3, 4, 5, 6, 7, 8, [3]int{9, 10, 11}, 12}) },
+			"testTracebackArgs8d({0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, {0x9, 0xa, ...}, ...})",
+		},
 	}
 	for _, test := range tests {
 		n := test.fn()
@@ -64,11 +116,11 @@
 }
 
 //go:noinline
-func testTracebackArgs1(a, b, c, d, e, f, g, h, i, j, k, l int) int {
+func testTracebackArgs1(a, b, c, d, e int) int {
 	n := runtime.Stack(testTracebackArgsBuf[:], false)
 	if a < 0 {
 		// use in-reg args to keep them alive
-		return a + b + c + d + e + f + g + h + i + j + k + l
+		return a + b + c + d + e
 	}
 	return n
 }
@@ -119,3 +171,122 @@
 	}
 	return n
 }
+
+//go:noinline
+func testTracebackArgs6a(a, b, c, d, e, f, g, h, i, j int) int {
+	n := runtime.Stack(testTracebackArgsBuf[:], false)
+	if a < 0 {
+		// use in-reg args to keep them alive
+		return a + b + c + d + e + f + g + h + i + j
+	}
+	return n
+}
+
+//go:noinline
+func testTracebackArgs6b(a, b, c, d, e, f, g, h, i, j, k int) int {
+	n := runtime.Stack(testTracebackArgsBuf[:], false)
+	if a < 0 {
+		// use in-reg args to keep them alive
+		return a + b + c + d + e + f + g + h + i + j + k
+	}
+	return n
+}
+
+//go:noinline
+func testTracebackArgs7a(a [10]int) int {
+	n := runtime.Stack(testTracebackArgsBuf[:], false)
+	if a[0] < 0 {
+		// use in-reg args to keep them alive
+		return a[1] + a[2] + a[3] + a[4] + a[5] + a[6] + a[7] + a[8] + a[9]
+	}
+	return n
+}
+
+//go:noinline
+func testTracebackArgs7b(a [11]int) int {
+	n := runtime.Stack(testTracebackArgsBuf[:], false)
+	if a[0] < 0 {
+		// use in-reg args to keep them alive
+		return a[1] + a[2] + a[3] + a[4] + a[5] + a[6] + a[7] + a[8] + a[9] + a[10]
+	}
+	return n
+}
+
+//go:noinline
+func testTracebackArgs7c(a [10]int, b int) int {
+	n := runtime.Stack(testTracebackArgsBuf[:], false)
+	if a[0] < 0 {
+		// use in-reg args to keep them alive
+		return a[1] + a[2] + a[3] + a[4] + a[5] + a[6] + a[7] + a[8] + a[9] + b
+	}
+	return n
+}
+
+//go:noinline
+func testTracebackArgs7d(a [11]int, b int) int {
+	n := runtime.Stack(testTracebackArgsBuf[:], false)
+	if a[0] < 0 {
+		// use in-reg args to keep them alive
+		return a[1] + a[2] + a[3] + a[4] + a[5] + a[6] + a[7] + a[8] + a[9] + a[10] + b
+	}
+	return n
+}
+
+type testArgsType8a struct {
+	a, b, c, d, e, f, g, h int
+	i                      [2]int
+}
+type testArgsType8b struct {
+	a, b, c, d, e, f, g, h int
+	i                      [3]int
+}
+type testArgsType8c struct {
+	a, b, c, d, e, f, g, h int
+	i                      [2]int
+	j                      int
+}
+type testArgsType8d struct {
+	a, b, c, d, e, f, g, h int
+	i                      [3]int
+	j                      int
+}
+
+//go:noinline
+func testTracebackArgs8a(a testArgsType8a) int {
+	n := runtime.Stack(testTracebackArgsBuf[:], false)
+	if a.a < 0 {
+		// use in-reg args to keep them alive
+		return a.b + a.c + a.d + a.e + a.f + a.g + a.h + a.i[0] + a.i[1]
+	}
+	return n
+}
+
+//go:noinline
+func testTracebackArgs8b(a testArgsType8b) int {
+	n := runtime.Stack(testTracebackArgsBuf[:], false)
+	if a.a < 0 {
+		// use in-reg args to keep them alive
+		return a.b + a.c + a.d + a.e + a.f + a.g + a.h + a.i[0] + a.i[1] + a.i[2]
+	}
+	return n
+}
+
+//go:noinline
+func testTracebackArgs8c(a testArgsType8c) int {
+	n := runtime.Stack(testTracebackArgsBuf[:], false)
+	if a.a < 0 {
+		// use in-reg args to keep them alive
+		return a.b + a.c + a.d + a.e + a.f + a.g + a.h + a.i[0] + a.i[1] + a.j
+	}
+	return n
+}
+
+//go:noinline
+func testTracebackArgs8d(a testArgsType8d) int {
+	n := runtime.Stack(testTracebackArgsBuf[:], false)
+	if a.a < 0 {
+		// use in-reg args to keep them alive
+		return a.b + a.c + a.d + a.e + a.f + a.g + a.h + a.i[0] + a.i[1] + a.i[2] + a.j
+	}
+	return n
+}
diff --git a/src/sync/atomic/value.go b/src/sync/atomic/value.go
index 61f81d8..3500cd2 100644
--- a/src/sync/atomic/value.go
+++ b/src/sync/atomic/value.go
@@ -126,7 +126,7 @@
 	}
 }
 
-// CompareAndSwapPointer executes the compare-and-swap operation for the Value.
+// CompareAndSwap executes the compare-and-swap operation for the Value.
 //
 // All calls to CompareAndSwap for a given Value must use values of the same
 // concrete type. CompareAndSwap of an inconsistent type panics, as does
diff --git a/src/testing/testing.go b/src/testing/testing.go
index eeee0aa..a19238d 100644
--- a/src/testing/testing.go
+++ b/src/testing/testing.go
@@ -233,6 +233,8 @@
 //		os.Exit(m.Run())
 //	}
 //
+// TestMain is a low-level primitive and should not be necessary for casual
+// testing needs, where ordinary test functions suffice.
 package testing
 
 import (
@@ -678,7 +680,11 @@
 
 func (c *common) private() {}
 
-// Name returns the name of the running test or benchmark.
+// Name returns the name of the running (sub-) test or benchmark.
+//
+// The name will include the name of the test along with the names of
+// any nested sub-tests. If two sibling sub-tests have the same name,
+// Name will append a suffix to guarantee the returned name is unique.
 func (c *common) Name() string {
 	return c.name
 }
diff --git a/src/text/scanner/scanner.go b/src/text/scanner/scanner.go
index e0847a7..c5fc4ff 100644
--- a/src/text/scanner/scanner.go
+++ b/src/text/scanner/scanner.go
@@ -23,7 +23,7 @@
 	"unicode/utf8"
 )
 
-// A source position is represented by a Position value.
+// Position is a value that represents a source position.
 // A position is valid if Line > 0.
 type Position struct {
 	Filename string // filename, if any
diff --git a/src/time/format.go b/src/time/format.go
index bb173a2..f4b4f48 100644
--- a/src/time/format.go
+++ b/src/time/format.go
@@ -77,9 +77,9 @@
 // The formats  and 002 are space-padded and zero-padded
 // three-character day of year; there is no unpadded day of year format.
 //
-// A decimal point followed by one or more zeros represents a fractional
-// second, printed to the given number of decimal places.
-// Either a comma or decimal point followed by one or more nines represents
+// A comma or decimal point followed by one or more zeros represents
+// a fractional second, printed to the given number of decimal places.
+// A comma or decimal point followed by one or more nines represents
 // a fractional second, printed to the given number of decimal places, with
 // trailing zeros removed.
 // For example "15:04:05,000" or "15:04:05.000" formats or parses with
diff --git a/src/time/sleep_test.go b/src/time/sleep_test.go
index 6ee0631..e0172bf 100644
--- a/src/time/sleep_test.go
+++ b/src/time/sleep_test.go
@@ -527,6 +527,40 @@
 	}
 }
 
+// Test that rapidly moving a timer earlier doesn't cause it to get dropped.
+// Issue 47329.
+func TestTimerModifiedEarlier(t *testing.T) {
+	past := Until(Unix(0, 0))
+	count := 1000
+	fail := 0
+	for i := 0; i < count; i++ {
+		timer := NewTimer(Hour)
+		for j := 0; j < 10; j++ {
+			if !timer.Stop() {
+				<-timer.C
+			}
+			timer.Reset(past)
+		}
+
+		deadline := NewTimer(10 * Second)
+		defer deadline.Stop()
+		now := Now()
+		select {
+		case <-timer.C:
+			if since := Since(now); since > 8*Second {
+				t.Errorf("timer took too long (%v)", since)
+				fail++
+			}
+		case <-deadline.C:
+			t.Error("deadline expired")
+		}
+	}
+
+	if fail > 0 {
+		t.Errorf("%d failures", fail)
+	}
+}
+
 // Benchmark timer latency when the thread that creates the timer is busy with
 // other work and the timers must be serviced by other threads.
 // https://golang.org/issue/38860
diff --git a/src/time/time.go b/src/time/time.go
index 1cf1e2b..4ecc3d8 100644
--- a/src/time/time.go
+++ b/src/time/time.go
@@ -1334,7 +1334,7 @@
 }
 
 // UnixMicro returns the local Time corresponding to the given Unix time,
-// usec milliseconds since January 1, 1970 UTC.
+// usec microseconds since January 1, 1970 UTC.
 func UnixMicro(usec int64) Time {
 	return Unix(usec/1e6, (usec%1e6)*1e3)
 }
diff --git a/test/bench/go1/regexp_test.go b/test/bench/go1/regexp_test.go
index 3ce9f3a..dd1034f 100644
--- a/test/bench/go1/regexp_test.go
+++ b/test/bench/go1/regexp_test.go
@@ -53,7 +53,7 @@
 func BenchmarkRegexpMatchEasy0_1K(b *testing.B)  { benchmark(b, easy0, 1<<10) }
 func BenchmarkRegexpMatchEasy1_32(b *testing.B)  { benchmark(b, easy1, 32<<0) }
 func BenchmarkRegexpMatchEasy1_1K(b *testing.B)  { benchmark(b, easy1, 1<<10) }
-func BenchmarkRegexpMatchMedium_32(b *testing.B) { benchmark(b, medium, 1<<0) }
+func BenchmarkRegexpMatchMedium_32(b *testing.B) { benchmark(b, medium, 32<<0) }
 func BenchmarkRegexpMatchMedium_1K(b *testing.B) { benchmark(b, medium, 1<<10) }
 func BenchmarkRegexpMatchHard_32(b *testing.B)   { benchmark(b, hard, 32<<0) }
 func BenchmarkRegexpMatchHard_1K(b *testing.B)   { benchmark(b, hard, 1<<10) }
diff --git a/test/fixedbugs/issue47185.dir/bad/bad.go b/test/fixedbugs/issue47185.dir/bad/bad.go
new file mode 100644
index 0000000..1aa4fbb
--- /dev/null
+++ b/test/fixedbugs/issue47185.dir/bad/bad.go
@@ -0,0 +1,72 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+// Note that the use of CGO here is solely to trigger external
+// linking, since that is required to trigger that bad behavior
+// in this bug.
+
+// #include <stdlib.h>
+import "C"
+
+func Bad() {
+	m := make(map[int64]A)
+	a := m[0]
+	if len(a.B.C1.D2.E2.F1) != 0 ||
+		len(a.B.C1.D2.E2.F2) != 0 ||
+		len(a.B.C1.D2.E2.F3) != 0 ||
+		len(a.B.C1.D2.E2.F4) != 0 ||
+		len(a.B.C1.D2.E2.F5) != 0 ||
+		len(a.B.C1.D2.E2.F6) != 0 ||
+		len(a.B.C1.D2.E2.F7) != 0 ||
+		len(a.B.C1.D2.E2.F8) != 0 ||
+		len(a.B.C1.D2.E2.F9) != 0 ||
+		len(a.B.C1.D2.E2.F10) != 0 ||
+		len(a.B.C1.D2.E2.F11) != 0 ||
+		len(a.B.C1.D2.E2.F16) != 0 {
+		panic("bad")
+	}
+	C.malloc(100)
+}
+
+type A struct {
+	B
+}
+
+type B struct {
+	C1 C
+	C2 C
+}
+
+type C struct {
+	D1 D
+	D2 D
+}
+
+type D struct {
+	E1 E
+	E2 E
+	E3 E
+	E4 E
+}
+
+type E struct {
+	F1  string
+	F2  string
+	F3  string
+	F4  string
+	F5  string
+	F6  string
+	F7  string
+	F8  string
+	F9  string
+	F10 string
+	F11 string
+	F12 string
+	F13 string
+	F14 string
+	F15 string
+	F16 string
+}
diff --git a/test/fixedbugs/issue47185.dir/main.go b/test/fixedbugs/issue47185.dir/main.go
new file mode 100644
index 0000000..7b46e55
--- /dev/null
+++ b/test/fixedbugs/issue47185.dir/main.go
@@ -0,0 +1,28 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	bad "issue47185.dir/bad"
+)
+
+func main() {
+	another()
+	bad.Bad()
+}
+
+func another() L {
+	m := make(map[string]L)
+	return m[""]
+}
+
+type L struct {
+	A Data
+	B Data
+}
+
+type Data struct {
+	F1 [22][]string
+}
diff --git a/test/fixedbugs/issue47185.go b/test/fixedbugs/issue47185.go
new file mode 100644
index 0000000..9c921b8
--- /dev/null
+++ b/test/fixedbugs/issue47185.go
@@ -0,0 +1,11 @@
+// +build cgo
+// runindir
+
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Another test to verify compiler and linker handling of multiple
+// competing map.zero symbol definitions.
+
+package ignored
diff --git a/test/fixedbugs/issue47201.dir/a.go b/test/fixedbugs/issue47201.dir/a.go
new file mode 100644
index 0000000..54b7079
--- /dev/null
+++ b/test/fixedbugs/issue47201.dir/a.go
@@ -0,0 +1,13 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	. "fmt"
+)
+
+func test() {
+	Println("foo")
+}
diff --git a/test/fixedbugs/issue47201.dir/b.go b/test/fixedbugs/issue47201.dir/b.go
new file mode 100644
index 0000000..5fd0635
--- /dev/null
+++ b/test/fixedbugs/issue47201.dir/b.go
@@ -0,0 +1,9 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func Println() {} // ERROR "Println redeclared in this block"
+
+func main() {}
diff --git a/test/fixedbugs/issue47201.go b/test/fixedbugs/issue47201.go
new file mode 100644
index 0000000..e3a470b
--- /dev/null
+++ b/test/fixedbugs/issue47201.go
@@ -0,0 +1,7 @@
+// errorcheckdir
+
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored
diff --git a/test/fixedbugs/issue47317.dir/a.s b/test/fixedbugs/issue47317.dir/a.s
new file mode 100644
index 0000000..b969ddb
--- /dev/null
+++ b/test/fixedbugs/issue47317.dir/a.s
@@ -0,0 +1,6 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+TEXT	·G(SB),4,$0
+	RET
diff --git a/test/fixedbugs/issue47317.dir/x.go b/test/fixedbugs/issue47317.dir/x.go
new file mode 100644
index 0000000..83b5542
--- /dev/null
+++ b/test/fixedbugs/issue47317.dir/x.go
@@ -0,0 +1,17 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 47317: ICE when calling ABI0 function via func value.
+
+package main
+
+func main() { F() }
+
+func F() interface{} {
+	g := G
+	g(1)
+	return G
+}
+
+func G(x int) [2]int
diff --git a/test/fixedbugs/issue47317.go b/test/fixedbugs/issue47317.go
new file mode 100644
index 0000000..3548e90
--- /dev/null
+++ b/test/fixedbugs/issue47317.go
@@ -0,0 +1,7 @@
+// builddir
+
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored