pull request<\/a>\uff0c Linux 4.20 \u6216 5.0 \u5c06\u4e0d\u518d\u4f9d\u8d56\u4e8e\u53ef\u53d8\u957f\u6570\u7ec4\u3002\u53ef\u53d8\u957f\u6570\u7ec4\uff08variable length array\uff0c\u7b80\u79f0 VLA\uff09\u662f\u6307\u6570\u7ec4\u5bf9\u8c61\u7684\u957f\u5ea6\u5728\u8fd0\u884c\u65f6\u800c\u4e0d\u662f\u7f16\u8bd1\u65f6\u786e\u5b9a\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\u4f46\u4f7f\u7528 VLA \u4f1a\u5b58\u5728\u95ee\u9898\uff0c\u5305\u62ec\u589e\u52a0\u8fd0\u884c\u65f6\u5f00\u9500\u2014\u2014\u56e0\u4e3a\u6570\u7ec4\u957f\u5ea6\u9700\u8981\u5728\u8fd0\u884c\u65f6\u786e\u5b9a\uff1b LLVM Clang \u7f16\u8bd1\u5668\u4e0d\u652f\u6301\u7ed3\u6784\u5185 VLA\uff0c\u5b83\u53ea\u652f\u6301 C99 \u98ce\u683c\u7684 VLA\uff1b\u5b58\u5728\u5b89\u5168\u9690\u60a3\u3002Linus Torvalds \u5bf9 VLA \u7684\u4f7f\u7528\u516c\u5f00\u8868\u8fbe\u8fc7\u4e0d\u8d5e\u6210\uff0c\u8ba4\u4e3a\u76f8\u6bd4\u56fa\u5b9a\u957f\u5ea6\uff0cVLA \u4ea7\u751f\u4e86\u66f4\u591a\u7684\u4ee3\u7801\u548c\u66f4\u6162\u7684\u4ee3\u7801\u3002<\/p>\n
\u901a\u8fc7\u5f00\u53d1\u4e2d\u7684Linux 4.20\u5185\u6838\uff0c\u5b83\u73b0\u5728\u53ef\u4ee5\u5b9e\u73b0\u65e0VLA ...\u53ef\u53d8\u957f\u5ea6\u6570\u7ec4\uff08VLA\uff09\u53ef\u4ee5\u65b9\u4fbf\u5e76\u4e14\u662fC99\u6807\u51c6\u7684\u4e00\u90e8\u5206\uff0c\u4f46\u53ef\u80fd\u4f1a\u4ea7\u751f\u610f\u60f3\u4e0d\u5230\u7684\u540e\u679c\u3002<\/p>\n
VLA\u5141\u8bb8\u5728\u8fd0\u884c\u65f6\u800c\u4e0d\u662f\u7f16\u8bd1\u65f6\u786e\u5b9a\u6570\u7ec4\u957f\u5ea6\u3002 Linux\u5185\u6838\u957f\u671f\u4ee5\u6765\u4e00\u76f4\u4f9d\u8d56\u4e8e\u5185\u6838\u4e0d\u540c\u90e8\u5206\u7684VLA\uff08\u5305\u62ec\u7ed3\u6784\u5185\u90e8\uff09\uff0c\u4f46\u73b0\u5728\u6301\u7eed\u6570\u6708\uff08\u5982\u679c\u8ba1\u7b97\u5185\u6838Clang\u7684\u5de5\u4f5c\u6570\u5e74\uff0c\u5219\u5df2\u7ecf\u8fc7\u53bb\u51e0\u5e74\uff09\u5df2\u7ecf\u5220\u9664\u4e86\u53ef\u53d8\u957f\u5ea6\u6570\u7ec4\u7684\u4f7f\u7528\u5728\u5185\u6838\u4e2d\u3002\u5b83\u4eec\u7684\u95ee\u9898\u662f\uff1a<\/p>\n
- \u7531\u4e8e\u9700\u8981\u5728\u8fd0\u884c\u65f6\u786e\u5b9a\u6570\u7ec4\u7684\u5927\u5c0f\uff0c\u56e0\u6b64\u4f7f\u7528\u53ef\u53d8\u957f\u5ea6\u6570\u7ec4\u4f1a\u7ed9\u4ee3\u7801\u6dfb\u52a0\u4e00\u4e9b\u8f83\u5c0f\u7684\u8fd0\u884c\u65f6\u5f00\u9500\u3002<\/p>\n
- LLVM Clang\u7f16\u8bd1\u5668\u4e0d\u652f\u6301\u7ed3\u6784\u4e2d\u7684VLA\uff0c\u56e0\u6b64\u5bf9\u4e8e\u90a3\u4e9b\u60f3\u8981\u5728GCC\u4e4b\u5916\u6784\u5efa\u5185\u6838\u7684\u4eba\u6765\u8bf4\uff0cClang\u53ea\u652f\u6301C99\u98ce\u683c\u7684VLA\u3002<\/p>\n
- \u53ef\u4ee5\u8bf4\u6700\u91cd\u8981\u7684\u662f\uff0cVDA\u53ef\u80fd\u4f1a\u5bf9\u5185\u6838\u7684\u5806\u6808\u4f7f\u7528\u4ea7\u751f\u5b89\u5168\u9690\u60a3\u3002<\/p>\n
Linus Torvalds\u5728\u8fc7\u53bb\u5bf9VLA\u7684\u4f7f\u7528\u8868\u8fbe\u4e86\u4ed6\u7684\u4e0d\u6ee1\uff0c\u4f8b\u5982\u201c\u4f7f\u7528VLA\u662f\u79ef\u6781\u7684\u611a\u8822\uff01\u5b83\u4ea7\u751f\u4e86\u66f4\u591a\u4ee3\u7801\uff0c\u66f4\u591a_slower_\u4ee3\u7801\uff08\u548c\u66f4\u8106\u5f31\u7684\u4ee3\u7801\uff09\u201d\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u4f7f\u7528\u56fa\u5b9a\u7684\u5bc6\u94a5\u5927\u5c0f\u201c\u3002<\/p>\n
\u7279\u522b\u662f\u5728\u8fc7\u53bb\u7684\u51e0\u4e2a\u5468\u671f\u4e2d\uff0c\u5df2\u7ecf\u6709\u4ee3\u7801\u6d88\u9664\u4e86\u5185\u6838\u5bf9VLA\u7684\u4f7f\u7528\uff0c\u5e76\u4e14\u5230\u76ee\u524d\u4e3a\u6b62\u8fd9\u4e2aLinux 4.20~5.0\u5468\u671f\u4ecd\u5728\u7ee7\u7eed\u3002\u5185\u6838\u4e2d\u6709\u8d85\u8fc7200\u4e2a\u4f9d\u8d56\u4e8eVLA\u7684\u70b9\uff0c\u4f46\u73b0\u5728\u6700\u65b0\u7684Linux Git\u4ee3\u7801\u5e94\u8be5\u57fa\u672c\u7ed3\u675f\u4e86\u3002<\/p>\n
Kees Cook\u4eca\u5929\u53d1\u51fa\u4e86\u62c9\u53d6\u8bf7\u6c42\uff0c\u7528\u4e8e\u79fb\u9664VLA\uff0c\u73b0\u5728\uff0c\u5982\u679c\u5728\u5185\u6838\u7684C\u4ee3\u7801\u4e2d\u627e\u5230\u4efb\u4f55\u53ef\u53d8\u957f\u5ea6\u6570\u7ec4\uff0c\u5219\u201c-Wvla\u201d\u7f16\u8bd1\u5668\u6807\u5fd7\u4f1a\u53d1\u51fa\u8b66\u544a\u3002\u8fd9\u5c06\u6709\u52a9\u4e8e\u9632\u6b62\u65b0\u4ee3\u7801\u65e0\u610f\u4e2d\u4f7f\u7528VLA\uff0c\u5e76\u53d1\u73b0\u4ecd\u4f9d\u8d56\u4e8e\u6b64\u884c\u4e3a\u7684\u4efb\u4f55\u5ef6\u8fdf\u5185\u6838\u4ee3\u7801\u3002<\/p>\n
Kees Cook\u5199\u9053\uff0c\u53ef\u80fd\u8fd8\u6709\u4e00\u4e9b\u5730\u65b9\u53ef\u4ee5\u627e\u5230VLA\uff0c\u201c\u53ef\u80fd\u4f1a\u6709\u66f4\u591a\u7684VLA\u9690\u85cf\u5728\u96be\u4ee5\u627e\u5230\u7684randconfig\u4e2d\uff0c\u4f46\u662f\u5728linux-next\u7684\u4e0a\u4e2a\u6708\u5de6\u53f3\u6ca1\u6709\u4efb\u4f55\u5927\u7684\u9707\u52a8\u6211\u4eec\u73b0\u5728\u5e94\u8be5\u57fa\u672c\u4e0a\u6ca1\u6709VLA\u4e86\uff01\u201d<\/p>\n","protected":false},"excerpt":{"rendered":"
\u4f46\u4f7f\u7528 VLA \u4f1a\u5b58\u5728\u95ee\u9898\uff0c\u5305\u62ec\u589e\u52a0\u8fd0\u884c\u65f6\u5f00\u9500\u2014\u2014\u56e0\u4e3a\u6570\u7ec4\u957f\u5ea6\u9700\u8981\u5728\u8fd0\u884c\u65f6\u786e\u5b9a\uff1b LLVM Clang \u7f16\u8bd1\u5668 […]<\/p>\n","protected":false},"author":63,"featured_media":125996,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[21],"tags":[],"class_list":["post-125991","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/125991","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=125991"}],"version-history":[{"count":3,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/125991\/revisions"}],"predecessor-version":[{"id":126099,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/125991\/revisions\/126099"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/125996"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=125991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=125991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=125991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}