{"id":4683,"date":"2008-12-17T11:59:00","date_gmt":"2008-12-17T11:59:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vcblog\/2008\/12\/17\/vc9-sp1-hotfix-for-the-vectorfunctionft-crash\/"},"modified":"2019-02-18T18:53:56","modified_gmt":"2019-02-18T18:53:56","slug":"vc9-sp1-hotfix-for-the-vectorfunctionft-crash","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/vc9-sp1-hotfix-for-the-vectorfunctionft-crash\/","title":{"rendered":"VC9 SP1 Hotfix For The vector&#060;function&#060;FT&#062;&#062; Crash"},"content":{"rendered":"<p class=\"MsoNormal\"><span>Back in August, I blogged about the <a href=\"http:\/\/blogs.msdn.com\/vcblog\/archive\/2008\/08\/11\/tr1-fixes-in-vc9-sp1.aspx\"><font color=\"#0000ff\">TR1 fixes in VC9 SP1<\/font><\/a>.&nbsp; An observant reader, grokbrsm, <a href=\"http:\/\/blogs.msdn.com\/vcblog\/archive\/2008\/08\/11\/tr1-fixes-in-vc9-sp1.aspx#8870759\"><font color=\"#0000ff\">commented<\/font><\/a> that <\/span><span>vector&lt;function&lt;FT&gt;&gt;<\/span><span> was broken by VC9 SP1.&nbsp; A hotfix for this bug is now available:<\/span><\/p>\n<p class=\"MsoNormal\"><span><\/span>&nbsp;<\/p>\n<p><span><span><\/p>\n<p class=\"MsoNormal\"><span>Here is the&nbsp;updated link to download the hotfix: <a href=\"https:\/\/connect.microsoft.com\/VisualStudio\/Downloads\/DownloadDetails.aspx?DownloadID=17034&amp;amp;wa=wsignin1.0\">https:\/\/connect.microsoft.com\/VisualStudio\/Downloads\/DownloadDetails.aspx?DownloadID=17034&amp;amp;wa=wsignin1.0<\/a><\/span><\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\">\n<p><\/span><span>This hotfix actually fixes 5 bugs:<\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><span><\/p>\n<p>&nbsp;<\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><span>1. <\/span><span>function&lt;FT&gt;::swap()<\/span><span> was broken by the Small Functor Optimization in VC9 TR1 (the Feature Pack).&nbsp; This broke <\/span><span>vector&lt;function&lt;FT&gt;&gt;<\/span><span> in VC9 SP1.&nbsp; &#8220;Broken&#8221; meant &#8220;compiling but crashing&#8221;.<\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><span><\/p>\n<p>&nbsp;<\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><span>2. <\/span><span>vector&lt;pair&lt;X, string&gt;&gt;<\/span><span> nonconformantly required <\/span><span>X<\/span><span> to have a default constructor.&nbsp; (This is a specific example of a general bug: <\/span><span>vector&lt;pair&lt;string, X&gt;&gt;<\/span><span>, <\/span><span>vector&lt;pair&lt;X, vector&lt;int&gt;&gt;&gt;<\/span><span>, etc. were also affected.)<\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><span>&nbsp;<\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><span>3. <\/span><span>vector&lt;tuple&lt;X, Y, string&gt;&gt;<\/span><span> nonconformantly required <\/span><span>X<\/span><span> and <\/span><span>Y<\/span><span> to have default constructors.&nbsp; (This is a specific example of a general bug, see above.)<\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><span><\/p>\n<p>&nbsp;<\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><span>4. <\/span><span>vector&lt;array&lt;X, N&gt;&gt;<\/span><span> nonconformantly required <\/span><span>X<\/span><span> to have a default constructor.<\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><span><\/p>\n<p>&nbsp;<\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><span>5. Random distributions were broken, triggering infinite loops and emitting bogus results.<\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><span><\/p>\n<p>&nbsp;<\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><span>If you have any questions, I&#8217;ll be happy to answer them in the Comments.<\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><span><\/p>\n<p>&nbsp;<\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><span>Stephan T. Lavavej<\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><span>Visual C++ Libraries Developer<\/p>\n<p><\/span><\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Back in August, I blogged about the TR1 fixes in VC9 SP1.&nbsp; An observant reader, grokbrsm, commented that vector&lt;function&lt;FT&gt;&gt; was broken by VC9 SP1.&nbsp; A hotfix for this bug is now available: &nbsp; Here is the&nbsp;updated link to download the hotfix: https:\/\/connect.microsoft.com\/VisualStudio\/Downloads\/DownloadDetails.aspx?DownloadID=17034&amp;amp;wa=wsignin1.0 This hotfix actually fixes 5 bugs: &nbsp; 1. function&lt;FT&gt;::swap() was broken by the [&hellip;]<\/p>\n","protected":false},"author":289,"featured_media":35994,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4683","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus"],"acf":[],"blog_post_summary":"<p>Back in August, I blogged about the TR1 fixes in VC9 SP1.&nbsp; An observant reader, grokbrsm, commented that vector&lt;function&lt;FT&gt;&gt; was broken by VC9 SP1.&nbsp; A hotfix for this bug is now available: &nbsp; Here is the&nbsp;updated link to download the hotfix: https:\/\/connect.microsoft.com\/VisualStudio\/Downloads\/DownloadDetails.aspx?DownloadID=17034&amp;amp;wa=wsignin1.0 This hotfix actually fixes 5 bugs: &nbsp; 1. function&lt;FT&gt;::swap() was broken by the [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/4683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/289"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=4683"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/4683\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/35994"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=4683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=4683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=4683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}