{"id":115170,"date":"2026-10-11T11:40:52","date_gmt":"2026-10-11T03:40:52","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/115170.html"},"modified":"2026-10-11T11:40:52","modified_gmt":"2026-10-11T03:40:52","slug":"c%e7%bc%96%e7%a8%8b%e5%ae%9e%e8%b7%b5-%e5%a0%86%e5%92%8c%e6%a0%88%e8%b6%8a%e7%95%8c%e8%b0%83%e8%af%95","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/115170.html","title":{"rendered":"c++\u7f16\u7a0b\u5b9e\u8df5\u2014\u5806\u548c\u6808\u8d8a\u754c\u8c03\u8bd5"},"content":{"rendered":"<h3>\u4e00\u3001\u5185\u5b58\u8d8a\u754c<\/h3>\n<p>\u5185\u5b58\u7684\u95ee\u9898\u662fc\/c&#043;&#043;\u7684\u4f20\u7edf\u7684\u3001\u7ecf\u5178\u7684\u95ee\u9898\u3002\u4ece\u4e0d\u540c\u7684\u7ef4\u5ea6\u548c\u4e0d\u540c\u7684\u5c42\u6b21\u90fd\u53ef\u4ee5\u770b\u5230\u4e0d\u4e00\u6837\u7684\u60c5\u51b5\u3002\u5bf9\u4e8e\u4e00\u4e9b\u4e0d\u592a\u719f\u6089\u8c03\u8bd5\u7684\u5f00\u53d1\u8005\u6765\u8bf4&#xff0c;\u5806\u548c\u6808\u7684\u5d29\u6e83\u5728\u4ed6\u4eec\u773c\u4e2d\u90fd\u662f\u4e00\u6837\u7684&#xff0c;\u53cd\u6b63\u7ed3\u679c\u90fd\u662f\u5d29\u6e83\u7684\u3002\u4f46\u5728\u5b9e\u9645\u7684\u5e94\u7528\u4e2d&#xff0c;\u6709\u7ecf\u9a8c\u7684\u5f00\u53d1\u8005\u53ef\u4ee5\u8fc5\u901f\u7684\u6839\u636e\u60c5\u51b5\u5224\u522b\u662f\u5806\u8fd8\u662f\u6808\u5f15\u8d77\u7684\u8d8a\u754c\u5d29\u6e83\u3002<br \/>\n\u6b63\u5982\u524d\u9762\u53cd\u590d\u63d0\u5230\u7684&#xff0c;\u89e3\u51b3\u95ee\u9898\u7684\u5173\u952e\u4e0d\u662f\u4e00\u773c\u53d1\u73b0\u95ee\u9898&#xff0c;\u800c\u662f\u5b66\u4f1a\u9010\u6b65\u62bd\u4e1d\u5265\u8327\u7684\u80fd\u529b&#xff0c;\u4e00\u6b65\u6b65\u7684\u5b9a\u4f4d\u95ee\u9898\u7684\u7b56\u7565\u3002\u6709\u4e86\u89e3\u51b3\u95ee\u9898\u7684\u601d\u8def\u548c\u89e3\u51b3\u7684\u65b9\u5f0f&#xff0c;\u5c31\u53ef\u4ee5\u9002\u7528\u5230\u6240\u6709\u7684\u95ee\u9898\u5904\u7406\u4e0a&#xff0c;\u800c\u4e0d\u53ea\u662f\u5b66\u4f1a\u89e3\u51b3\u67d0\u4e2a\u95ee\u9898\u6216\u67d0\u7c7b\u95ee\u9898\u3002<br \/>\nc&#043;&#043;\u4e2d\u5185\u5b58\u7684\u95ee\u9898\u5f80\u5f80\u6709\u4e00\u5b9a\u7684\u6ede\u540e\u6027&#xff0c;\u8fd9\u4e2a\u6ede\u540e\u6027\u548c\u5806\u548c\u6808\u7684\u95ee\u9898\u5f15\u8d77\u6709\u7740\u5bc6\u5207\u7684\u5173\u7cfb\u3002\u4e00\u822c\u6765\u8bf4&#xff0c;\u6808\u7684\u5185\u5b58\u8d8a\u754c\u5f15\u8d77\u7684\u5d29\u6e83\u5f80\u5f80\u5f88\u5bb9\u6613\u5feb\u901f\u5b9a\u4f4d&#xff1b;\u4f46\u5806\u5f15\u8d77\u7684\u5185\u5b58\u8d8a\u754c&#xff0c;\u76f8\u5bf9\u8981\u590d\u6742\u4e00\u4e9b&#xff0c;\u4e2a\u522b\u60c5\u51b5\u4e0b\u4f1a\u76f8\u5f53\u7684\u590d\u6742\u3002\u5982\u679c\u518d\u4f7f\u7528\u4e86\u6a21\u677f\u6216STL\u4e2d\u7684\u7ec4\u4ef6&#xff0c;\u6709\u53ef\u80fd\u6ee1\u5c4f\u7684\u9519\u8bef\u8ba9\u5f00\u53d1\u8005\u5f53\u573a\u5b95\u673a\u3002<\/p>\n<h3>\u4e8c\u3001\u6808\u548c\u5806\u7684\u4e0d\u540c<\/h3>\n<p>\u6808\u7531\u7cfb\u7edf\u7ba1\u7406\u800c\u5806\u7531\u5f00\u53d1\u8005\u81ea\u5df1\u7ba1\u7406\u3002\u65e2\u7136\u5806\u548c\u6808\u7684\u8d8a\u754c\u5bfc\u81f4\u95ee\u9898\u7684\u7ed3\u679c\u6392\u67e5\u6709\u6240\u4e0d\u540c&#xff0c;\u4e0b\u9762\u5c31\u5bf9\u4ed6\u4eec\u8fdb\u884c\u4e00\u4e0b\u8be6\u7ec6\u7684\u7ed3\u6bd4\u5206\u6790&#xff1a;<\/p>\n<li>\u8d8a\u754c\u8bfb<br \/>\nheap overflow\u548cstack overflow\u5982\u679c\u662f\u5728\u5185\u5b58\u8d8a\u754c\u8bfb\u7684\u60c5\u51b5\u4e0b&#xff0c;\u8fd8\u662f\u6709\u6240\u4e0d\u540c\u7684\u3002\u6b63\u5e38\u7684\u60c5\u51b5\u4e0b&#xff0c;\u5806\u8d8a\u754c\u7684\u8bfb&#xff0c;\u53ea\u8981\u4e0d\u504f\u79bb\u7279\u522b\u79bb\u8c31&#xff0c;\u6bd4\u5982\u76f4\u63a5\u8bfb\u5230\u4fdd\u62a4\u7684\u5730\u5740\u7a7a\u95f4&#xff0c;\u4e00\u822c\u662f\u4e0d\u4f1a\u5f15\u8d77\u5d29\u6e83\u7684\u3002\u4f46\u6808\u8d8a\u754c\u8bfb&#xff0c;\u7279\u522b\u662f\u5f00\u542f\u4e86\u6808\u4fdd\u62a4\u7684\u60c5\u51b5\u4e0b&#xff08;\u7c7b\u4f3cg&#043;&#043;\u4e2d\u7684-fstack-protector&#xff09;&#xff0c;\u7a0b\u5e8f\u4f1a\u8c03\u7528__stack_chk_fail\u7ed3\u675f\u6267\u884c\u3002\u6b64\u65f6\u7684\u5d29\u6e83\u60c5\u51b5\u6307\u5411\u660e\u786e\u5c31\u5728\u7834\u574f\u7684\u6808\u5730\u5740\u3002\u4f46\u5982\u679c\u6ca1\u6709\u542f\u7528\u6808\u4fdd\u62a4\u7684\u60c5\u51b5\u4e0b&#xff0c;\u6709\u53ef\u80fd\u4e0d\u4f1a\u5d29\u6e83&#xff0c;\u4f46\u4e5f\u6709\u53ef\u80fd\u4f1a\u5728\u8c03\u7528\u7ed3\u675f\u6216\u7a0b\u5e8f\u7ed3\u675f\u65f6\u5f15\u53d1\u5d29\u6e83\u7684\u60c5\u51b5<\/li>\n<li>\u8d8a\u754c\u5199<br \/>\n\u5982\u679c\u662f\u8d8a\u754c\u5199\u7684\u60c5\u51b5&#xff0c;\u76f8\u5bf9\u590d\u6742\u4e00\u4e9b\u3002\u5bf9\u4e8e\u6808\u7a7a\u95f4\u6765\u8bf4&#xff0c;\u5982\u679c\u8d8a\u754c\u8303\u56f4\u4e0d\u5927&#xff0c;\u5219\u53ef\u80fd\u8868\u73b0\u4e3a\u6570\u636e\u7684\u5f02\u5e38&#xff0c;\u4f46\u4e0d\u4e00\u5b9a\u4f1a\u7acb\u523b\u5d29\u6e83\u3002\u4e0d\u8fc7\u5982\u679c\u4e0d\u5c0f\u5fc3\u8fd9\u6bb5\u5199\u6b63\u597d\u8986\u76d6\u4e86\u51fd\u6570\u8fd4\u56de\u65f6\u7684\u5730\u5740&#xff0c;\u5219\u4f1a\u51fa\u73b0SIGSEGV\u3002\u6b64\u65f6\u7684\u5d29\u6e83\u7684\u5730\u5740\u4f1a\u5728\u8fd4\u56de\u5730\u5740\u7684\u9644\u8fd1\u3002<br \/>\n\u5bf9\u4e8e\u5806\u6765\u8bf4&#xff0c;\u8d8a\u754c\u5199\u53ef\u80fd\u7834\u574f\u9644\u8fd1\u76f8\u90bb\u7684\u5176\u5b83\u6570\u636e&#xff0c;\u5982\u679c\u8fd9\u4e9b\u6570\u636e\u6b63\u5728\u88ab\u4fdd\u62a4\u6216\u8005\u88ab\u7834\u574f\u540e\u53c8\u88ab\u4f7f\u7528&#xff0c;\u5c31\u6709\u53ef\u80fd\u4ea7\u751f\u5d29\u6e83\u3002\u4f46\u8fd9\u79cd\u5d29\u6e83\u5f80\u5f80\u4e0d\u4f1a\u7acb\u523b\u53d1\u751f\u3002\u800c\u5728\u5728\u91cd\u65b0\u5206\u914d\u3001\u91ca\u653e\u6216\u5176\u5b83\u60c5\u51b5\u4e0b\u624d\u53ef\u80fd\u5d29\u6e83&#xff08;\u5982\u51fd\u6570\u8fd4\u56de\u7b49&#xff09;\u3002\u5b83\u62a5\u7684\u9519\u8bef\u4e00\u822c\u662f\u201cinvalid next size\u3001invalid pointer\u3001corrupted top size\u3001double free or corruption\u201d\u3002\u5c24\u5176\u6700\u540e\u4e00\u4e2a\u91cd\u590d\u91ca\u653e\u662f\u6700\u5bb9\u6613\u51fa\u73b0\u7684\u95ee\u9898\u3002<br \/>\n\u53e6\u5916\u5728c&#043;&#043;\u4e2d\u8fd8\u6709\u4e00\u4e2a\u6bd4\u8f83\u7279\u6b8a\u7684\u60c5\u51b5\u5c31\u662f\u865a\u8868\u6216\u51fd\u6570\u6307\u9488\u7684\u95ee\u9898&#xff0c;\u5982\u679c\u8d8a\u754c\u5199\u5bf9\u5b83\u4eec\u9020\u6210\u4e86\u7834\u574f&#xff0c;\u5728\u5176\u540e\u5e94\u7528\u65f6&#xff0c;\u4f1aSIGSEGV\u5d29\u6e83<\/li>\n<li>\u591a\u7ebf\u7a0b\u60c5\u51b5\u4e0b<br \/>\n\u5728\u590d\u6742\u7684\u591a\u7ebf\u7a0b\u7684\u60c5\u51b5\u4e0b&#xff0c;\u7531\u4e8e\u5b58\u5728\u7740guard page&#xff0c;\u6808\u7684\u8d8a\u754c\u5219\u53ef\u80fd\u76f4\u63a5SIGSEGV&#xff0c;\u5176\u5d29\u6e83\u65f6\u7684\u663e\u793a\u7684\u5730\u5740\u7a7a\u95f4\u53ef\u80fd\u5728\u79bb\u5177\u4f53\u5730\u5740\u4e0d\u8fdc\u7684\u4f4d\u7f6e<\/li>\n<li>\u8fc7\u6df1\u8c03\u7528\u65f6\u5d29\u6e83<br \/>\n\u6808\u7a7a\u95f4\u5d29\u6e83\u7684\u53e6\u5916\u4e00\u4e2a\u91cd\u8981\u70b9\u5728\u4e8e\u8fc7\u6df1\u7684\u8c03\u7528&#xff0c;\u5178\u578b\u7684\u5c31\u662f\u9012\u5f52\u3002SIGSEGV\u7684\u4f4d\u7f6e\u5927\u7ea6\u5728\u6808\u7684\u8fb9\u754c&#xff0c;\u5982\u679c\u4f7f\u7528bt\u6808\u56de\u6eaf\u7684\u60c5\u51b5\u4e0b\u53ef\u4ee5\u770b\u5230\u5927\u91cf\u7684\u91cd\u590d\u8c03\u7528<\/li>\n<li>\u5185\u5b58\u6620\u5c04\u7684\u5904\u7406<br \/>\n\u5bf9\u4e8e\u5185\u5b58\u6620\u5c04\u6765\u8bf4&#xff0c;\u56e0\u4e3a\u5185\u5b58\u5206\u914d\u7684\u8fc7\u5927&#xff0c;\u4e00\u822c\u53ef\u80fd\u4e5f\u6709guard page&#xff0c;\u8fd9\u65f6\u8d8a\u754c\u5199&#xff0c;\u4e5f\u4f1a\u76f4\u63a5SIGSEGV\u3002\u66f4\u51c6\u786e\u7684\u8bf4\u662f\u5185\u5b58\u6620\u5c04\u8d8a\u754c\u8bbf\u95ee\u672a\u6620\u5c04\u9875\u9762\u6216PROT_NONE\u9875\u9762\u65f6&#xff0c;\u4f1a\u7acb\u523b\u53d1\u751fSIGSEGV<\/li>\n<p>\u901a\u8fc7\u4e0a\u9762\u7684\u5206\u6790&#xff0c;\u5176\u5b9e\u53ef\u4ee5\u53d1\u73b0&#xff0c;\u6808\u7531\u4e8e\u81ea\u8eab\u662f\u7cfb\u7edf\u7ba1\u7406&#xff0c;\u7a7a\u95f4\u6709\u9650&#xff0c;\u6240\u4ee5\u4e0d\u7ba1\u65f6\u8d8a\u754c\u5199\u8fd8\u662f\u8bfb&#xff0c;\u5176\u5f71\u54cd\u57fa\u672c\u90fd\u662f\u5c40\u90e8\u7684\u3001\u53ef\u4ee5\u8fc5\u901f\u7684\u5f15\u8d77\u5d29\u6e83\u5e76\u4e14\u5d29\u6e83\u70b9\u7684\u4f4d\u7f6e\u5f80\u5f80\u5728\u51fd\u6570\u8c03\u7528\u7684\u5f53\u524d\u4f4d\u7f6e\u6216\u8fd4\u56de\u4f4d\u7f6e&#xff1b;\u800c\u5806\u7531\u4e8e\u81ea\u884c\u7ba1\u7406&#xff0c;\u7a7a\u95f4\u8303\u56f4\u8f83\u5927&#xff0c;\u8c03\u7528\u5173\u7cfb\u76f8\u5bf9\u4e5f\u590d\u6742&#xff0c;\u6240\u4ee5\u5176\u5f71\u54cd\u8303\u56f4\u4e5f\u5927\u3001\u51fa\u73b0\u5d29\u6e83\u7684\u73b0\u8c61\u4f1a\u5ef6\u8fdf\u5e76\u4e14\u5d29\u6e83\u70b9\u5f80\u5f80\u4e0d\u662f\u5f15\u53d1\u5d29\u6e83\u7684\u4f4d\u7f6e\u3002<\/p>\n<h3>\u4e09\u3001\u5e94\u5bf9\u673a\u5236<\/h3>\n<p>\u8981\u60f3\u8fdb\u884c\u5d29\u6e83\u7684\u5206\u6790&#xff0c;\u4e00\u4e2a\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u5c31\u662f\u76f4\u63a5\u4f7f\u7528gdb\u5904\u7406Core\u6587\u4ef6\u3002\u5904\u7406\u7684\u673a\u5236\u4e00\u822c\u5982\u4e0b&#xff1a;<\/p>\n<li>\u8bbe\u7f6eCore dump<br \/>\n\u4e00\u822c\u9ed8\u8ba4\u7684\u60c5\u51b5\u4e0b&#xff0c;core dump\u662f\u7981\u6b62\u7684\u3002\u53ef\u4ee5\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u6253\u5f00&#xff1a;ulimit -c unlimited #\u5f00\u542fCore\u6587\u4ef6\u652f\u6301<br \/>\ng&#043;&#043; -g -O0 -fno-omit-frame-pointer demo.cpp #-g\u4e00\u822c\u9ed8\u8ba4-fno-omit-frame-pointer\u5f00\u542f&#xff0c;\u4f46\u5efa\u8bae\u4ecd\u7136\u589e\u52a0<\/p>\n<\/li>\n<li>gdb\u8c03\u8bd5Core\u6587\u4ef6<br \/>\n\u5728\u7a0b\u5e8f\u5d29\u6e83\u540e&#xff0c;\u627e\u5230\u76f8\u5173\u7684core\u6587\u4ef6&#xff0c;\u4e00\u822c\u662fcore\u540e\u9762\u52a0\u4e00\u5927\u4e32\u6570\u5b57\u3002\u7136\u540e\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u8fdb\u884c\u5904\u7406&#xff1a;gdb .\/runname core<br \/>\nbt full<\/p>\n<\/li>\n<li>\u5b9a\u4f4d\u95ee\u9898<br \/>\n\u7136\u540e\u5c31\u53ef\u4ee5\u4f7f\u7528\u5404\u79cdgdb\u7684\u76f8\u5173\u547d\u4ee4\u8fdb\u884c\u5206\u6790\u4e86&#xff0c;\u6bd4\u5982&#xff1a;info reg<br \/>\nx\/20i $pc  #\u4ece\u5f53\u524d\u7a0b\u5e8f\u8ba1\u6570\u5668\u6307\u5411\u7684\u5730\u5740\u5f00\u59cb&#xff0c;\u53cd\u6c47\u7f16\u5e76\u663e\u793a\u63a5\u4e0b\u6765\u768420\u6761\u673a\u5668\u6307\u4ee4<br \/>\np $_siginfo._sifields._sigfault.si_addr #\u6253\u5370\u5bfc\u81f4\u672c\u6b21\u4fe1\u53f7&#xff08;\u901a\u5e38\u662fSIGSEGV&#xff09;\u7684\u975e\u6cd5\u5185\u5b58\u8bbf\u95ee\u5730\u5740<\/p>\n<\/li>\n<p>\u4e00\u822c\u6765\u8bf4&#xff0c;\u901a\u8fc7\u4e0a\u9762\u7684\u5206\u6790&#xff0c;\u57fa\u7840\u7684\u5d29\u6e83\u95ee\u9898\u90fd\u53ef\u4ee5\u8f83\u4e3a\u5feb\u6377\u7684\u5b9a\u4f4d\u5230\u539f\u56e0\u3002\u590d\u6742\u7684\u60c5\u51b5\u5c31\u9700\u8981\u6839\u636e\u4e2a\u4eba\u7684\u7ecf\u9a8c\u6216\u501f\u52a9\u4e00\u4e9b\u5de5\u5177\u6765\u8fdb\u884c\u5206\u6790\u4e86\u3002\u81f3\u4e8e\u66f4\u590d\u6742\u548c\u96be\u4e8e\u53d1\u73b0\u7684\u95ee\u9898&#xff0c;\u5c31\u9700\u8981\u8ba4\u771f\u4ed4\u7ec6\u7684\u5bf9\u7a0b\u5e8f\u53cd\u590d\u7684\u5206\u6790\u548c\u8c03\u8bd5\u4e86\u3002<\/p>\n<h3>\u56db\u3001\u5b9e\u4f8b\u5206\u6790<\/h3>\n<p>\u4e0b\u9762\u7ed9\u51fa\u4e00\u4e2a\u5b9e\u4f8b&#xff0c;\u5148\u770b\u4ee3\u7801&#xff1a;<\/p>\n<p>#include &lt;sys\/mman.h&gt;<br \/>\n#include &lt;unistd.h&gt;<\/p>\n<p>#include &lt;cstdint&gt;<br \/>\n#include &lt;cstdio&gt;<br \/>\n#include &lt;cstdlib&gt;<br \/>\n#include &lt;cstring&gt;<br \/>\n#include &lt;iostream&gt;<br \/>\n#include &lt;string_view&gt;<br \/>\n#include &lt;thread&gt;<\/p>\n<p>#if defined(__GNUC__) || defined(__clang__)<br \/>\n#define NOINLINE __attribute__((noinline))<br \/>\n#else<br \/>\n#define NOINLINE<br \/>\n#endif<\/p>\n<p>static volatile std::uint64_t gSink &#061; 0;<\/p>\n<p>static NOINLINE void stackOob() {<br \/>\n  volatile int v[8]{};<br \/>\n  v[8] &#061; 0x1234;<br \/>\n  gSink &#061; static_cast&lt;std::uint64_t&gt;(v[0]);<br \/>\n}<\/p>\n<p>static NOINLINE void heapOob() {<br \/>\n  int *v &#061; new int[8]{};<br \/>\n  v[8] &#061; 0x1234;<br \/>\n  gSink &#061; static_cast&lt;std::uint64_t&gt;(v[0]);<br \/>\n  delete[] v;<br \/>\n}<\/p>\n<p>static NOINLINE void recurse(std::size_t depth) {<br \/>\n  volatile unsigned char pad[4096];<br \/>\n  pad[depth % sizeof(pad)] &#061; static_cast&lt;unsigned char&gt;(depth);<br \/>\n  recurse(depth &#043; 1);<br \/>\n  gSink &#043;&#061; pad[0]; \/\/ prevent tail-call elimination<br \/>\n}<\/p>\n<p>static NOINLINE int *returnLocalAddress() {<br \/>\n  int local &#061; 56;<br \/>\n  int *result &#061; &amp;local;<br \/>\n#if defined(__GNUC__) || defined(__clang__)<br \/>\n  asm volatile(&#034;&#034; : &#034;&#043;r&#034;(result) : : &#034;memory&#034;);<br \/>\n#endif<br \/>\n  return result; \/\/ dangling immediately after return<br \/>\n}<\/p>\n<p>static NOINLINE void returnedPointer() {<br \/>\n  int *p &#061; returnLocalAddress();<br \/>\n  *p &#061; 7;<br \/>\n  gSink &#061; static_cast&lt;std::uint64_t&gt;(*p);<br \/>\n}<\/p>\n<p>static NOINLINE void threadCrash() {<br \/>\n  std::thread worker([] {<br \/>\n    volatile int *p &#061; nullptr;<br \/>\n    *p &#061; 1;<br \/>\n  });<br \/>\n  worker.join();<br \/>\n}<\/p>\n<p>static NOINLINE void opaqueFree(void *p) {<br \/>\n#if defined(__GNUC__) || defined(__clang__)<br \/>\n  asm volatile(&#034;&#034; : &#034;&#043;r&#034;(p) : : &#034;memory&#034;);<br \/>\n#endif<br \/>\n  std::free(p);<br \/>\n}<\/p>\n<p>static NOINLINE void doubleFree() {<br \/>\n  void *p &#061; std::malloc(128);<br \/>\n  if (p &#061;&#061; nullptr) {<br \/>\n    std::abort();<br \/>\n  }<br \/>\n  opaqueFree(p);<br \/>\n  opaqueFree(p);<br \/>\n}<\/p>\n<p>static NOINLINE void invalidFree() {<br \/>\n  char *base &#061; static_cast&lt;char *&gt;(std::malloc(128));<br \/>\n  if (base &#061;&#061; nullptr) {<br \/>\n    std::abort();<br \/>\n  }<br \/>\n  void *interior &#061; base &#043; 1;<br \/>\n#if defined(__GNUC__) || defined(__clang__)<br \/>\n  asm volatile(&#034;&#034; : &#034;&#043;r&#034;(interior) : : &#034;memory&#034;);<br \/>\n#endif<br \/>\n  std::free(interior); \/\/ not the pointer returned by malloc<br \/>\n}<\/p>\n<p>static NOINLINE void invalidPointer() {<br \/>\n  volatile std::uintptr_t raw &#061; 0x1;<br \/>\n  auto *p &#061; reinterpret_cast&lt;volatile int *&gt;(raw);<br \/>\n  *p &#061; 9;<br \/>\n}<\/p>\n<p>static NOINLINE void corruptedDll() {<br \/>\n#if defined(__GLIBC__)<br \/>\n  constexpr std::size_t n &#061; 0x500; \/\/ bypass tcache\/small fast paths<br \/>\n  char *victim &#061; static_cast&lt;char *&gt;(std::malloc(n));<br \/>\n  void *guard &#061; std::malloc(0x40); \/\/ prevent top-chunk coalescing<br \/>\n  if (victim &#061;&#061; nullptr || guard &#061;&#061; nullptr) {<br \/>\n    std::abort();<br \/>\n  }<br \/>\n  std::memset(victim, 0x41, n);<br \/>\n  std::free(victim);<\/p>\n<p>  void **links &#061; reinterpret_cast&lt;void **&gt;(victim);<br \/>\n  links[1] &#061; victim &#8211; 2 * sizeof(std::size_t);<br \/>\n  void *trigger &#061; std::malloc(n &#043; 0x100);<br \/>\n  gSink &#061; reinterpret_cast&lt;std::uintptr_t&gt;(trigger);<br \/>\n  std::free(guard);<br \/>\n#else<br \/>\n  std::cerr &lt;&lt; &#034;corruptedDll requires glibc&#034; &lt;&lt; std::endl;<br \/>\n  std::exit(2);<br \/>\n#endif<br \/>\n}<\/p>\n<p>static NOINLINE void mmapOob() {<br \/>\n  const long rawPageSize &#061; ::sysconf(_SC_PAGESIZE);<br \/>\n  if (rawPageSize &lt;&#061; 0) {<br \/>\n    std::abort();<br \/>\n  }<br \/>\n  const std::size_t pageSize &#061; static_cast&lt;std::size_t&gt;(rawPageSize);<\/p>\n<p>  void *area &#061; ::mmap(nullptr, pageSize * 2, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);<br \/>\n  if (area &#061;&#061; MAP_FAILED) {<br \/>\n    std::perror(&#034;mmap&#034;);<br \/>\n    std::exit(2);<br \/>\n  }<br \/>\n  if (::mprotect(area, pageSize, PROT_READ | PROT_WRITE) !&#061; 0) {<br \/>\n    std::perror(&#034;mprotect&#034;);<br \/>\n    std::exit(2);<br \/>\n  }<\/p>\n<p>  auto *bytes &#061; static_cast&lt;volatile unsigned char *&gt;(area);<br \/>\n  bytes[pageSize &#8211; 1] &#061; 0x11;<br \/>\n  bytes[pageSize] &#061; 0x22;     \/\/ first byte in the PROT_NONE guard page<br \/>\n}<\/p>\n<p>struct Case {<br \/>\n  std::string_view name;<br \/>\n  void (*run)();<br \/>\n};<\/p>\n<p>static constexpr Case kCases[] &#061; {<br \/>\n    {&#034;stackOob&#034;, stackOob},         {&#034;heapOob&#034;, heapOob},       {&#034;recursion&#034;, [] { recurse(0); }}, {&#034;returnedPointer&#034;, returnedPointer},<br \/>\n    {&#034;threadCrash&#034;, threadCrash},   {&#034;doubleFree&#034;, doubleFree}, {&#034;invalidFree&#034;, invalidFree},      {&#034;invalidPointer&#034;, invalidPointer},<br \/>\n    {&#034;corruptedDll&#034;, corruptedDll}, {&#034;mmapOob&#034;, mmapOob},<br \/>\n};<\/p>\n<p>int main(int argc, char **argv) {<br \/>\n  if (argc !&#061; 2) {<br \/>\n    std::cerr &lt;&lt; &#034;usage: &#034; &lt;&lt; argv[0] &lt;&lt; &#034; &lt;case&gt;&#034; &lt;&lt; std::endl;<br \/>\n    for (const auto &amp;item : kCases) {<br \/>\n      std::cerr &lt;&lt; &#034;  &#034; &lt;&lt; item.name &lt;&lt; std::endl;<br \/>\n    }<br \/>\n    return 2;<br \/>\n  }<br \/>\n  for (const auto &amp;item : kCases) {<br \/>\n    if (item.name &#061;&#061; argv[1]) {<br \/>\n      std::cerr &lt;&lt; &#034;running: &#034; &lt;&lt; item.name &lt;&lt; std::endl;<br \/>\n      item.run();<br \/>\n      std::cerr &lt;&lt; &#034;returned without an immediate crash; use ASan\/Valgrind&#034; &lt;&lt; std::endl;<br \/>\n      return 0;<br \/>\n    }<br \/>\n  }<br \/>\n  std::cerr &lt;&lt; &#034;unknown case: &#034; &lt;&lt; argv[1] &lt;&lt; std::endl;<br \/>\n  return 2;<br \/>\n}<\/p>\n<p>\u8bf4\u660e&#xff1a;opaqueFree\u548cinvalidFree\u7b49\u51fd\u6570\u4e2d\u7684\u6c47\u7f16\u4ee3\u7801&#xff0c;\u4e3b\u8981\u662f\u7528\u6765\u5bf9\u7f16\u8bd1\u5668\u8fdb\u884c\u963b\u6b62\u6027\u5904\u7406&#xff0c;\u9632\u6b62\u76f4\u63a5\u7f16\u8bd1\u62a5\u5404\u79cd\u9519\u8bef<br \/>\n\u7f16\u8bd1\u65b9\u5f0f&#xff1a;<\/p>\n<p>g&#043;&#043; -std&#061;c&#043;&#043;17   -g3 -Og   -fno-omit-frame-pointer   -fno-optimize-sibling-calls   -pthread   main.cpp   -o crash_demo<\/p>\n<p>\u4f1a\u751f\u6210\u76f8\u5173\u7684core\u6587\u4ef6&#xff0c;\u6ce8\u610f&#xff0c;\u4e0d\u540c\u7684\u7cfb\u7edf\u548c\u4e0d\u540c\u7684\u7248\u672c\u7684\u64cd\u4f5c\u7cfb\u7edf&#xff0c;\u53ef\u80fd\u751f\u6210\u7684\u4f4d\u7f6e\u6709\u6240\u4e0d\u540c&#xff0c;\u5927\u5bb6\u53ef\u6839\u636e\u81ea\u5df1\u7684\u60c5\u51b5\u5728\u5f53\u524d\u76ee\u5f55\u6216\u76f8\u5173\u76ee\u5f55\u4e0b\u67e5\u627e<br \/>\n\u4f7f\u7528GDB&#xff0c;\u5176\u5e38\u7528\u7684\u547d\u4ee4\u8bf4\u660e&#xff1a;<\/p>\n<p>set pagination off          # \u5173\u95ed\u5206\u9875<br \/>\ninfo threads                # \u770b\u6709\u54ea\u4e9b\u7ebf\u7a0b<br \/>\nthread apply all bt         # \u770b\u6240\u6709\u7ebf\u7a0b\u8c03\u7528\u6808<br \/>\nthread apply all bt full    # \u9700\u8981\u65f6\u770b\u8be6\u7ec6\u5c40\u90e8\u53d8\u91cf<br \/>\nframe 0                     # \u5207\u5230\u5d29\u6e83\u5e27<br \/>\nlist                        # \u67e5\u770b\u5d29\u6e83\u70b9\u6e90\u7801<br \/>\ninfo locals                 # \u67e5\u770b\u5c40\u90e8\u53d8\u91cf<br \/>\ninfo registers              # \u67e5\u770b\u5bc4\u5b58\u5668<\/p>\n<p>\u542f\u52a8GDB\u8c03\u8bd5&#xff1a;<\/p>\n<p>gdb crash_demo core.1111<br \/>\n&#8230;\u5ffd\u7565\u8bf4\u660e<br \/>\nReading symbols from crash_demo&#8230;<br \/>\n[New LWP 2681680]<br \/>\n[New LWP 2681679]<\/p>\n<p>This GDB supports auto-downloading debuginfo from the following URLs:<br \/>\n  &lt;https:\/\/debuginfod.ubuntu.com&gt;<br \/>\nEnable debuginfod for this session? (y or [n]) y<br \/>\nDebuginfod has been enabled.<br \/>\nTo make this setting permanent, add &#039;set debuginfod enabled on&#039; to .gdbinit.<br \/>\n[Thread debugging using libthread_db enabled]<br \/>\nUsing host libthread_db library &#034;\/usr\/lib\/x86_64-linux-gnu\/libthread_db.so.1&#034;.<br \/>\nCore was generated by &#096;.\/crash_demo threadCrash&#039;.<br \/>\nProgram terminated with signal SIGSEGV, Segmentation fault.<br \/>\n#0  operator() (__closure&#061;&lt;optimized out&gt;) at main.cpp:58<br \/>\n58    *p &#061; 1;<br \/>\n[Current thread is 1 (Thread 0x7605dc9ff6c0 (LWP 2681680))]<\/p>\n<p>(gdb) info thread<br \/>\n  Id   Target Id                           Frame<br \/>\n* 1    Thread 0x7605dc9ff6c0 (LWP 2681680) operator() (__closure&#061;&lt;optimized out&gt;) at main.cpp:58<br \/>\n  2    Thread 0x7605dd180780 (LWP 2681679) __syscall_cancel_arch () at ..\/sysdeps\/unix\/sysv\/linux\/x86_64\/syscall_cancel.S:56<br \/>\nthread apply all bt<\/p>\n<p>Thread 2 (Thread 0x7605dd180780 (LWP 2681679)):<br \/>\n#0  __syscall_cancel_arch () at ..\/sysdeps\/unix\/sysv\/linux\/x86_64\/syscall_cancel.S:56<br \/>\n#1  0x00007605dcaa05ec in __internal_syscall_cancel (a1&#061;a1&#064;entry&#061;129767548386536, a2&#061;&lt;optimized out&gt;, a3&#061;&lt;optimized out&gt;, a4&#061;a4&#064;entry&#061;0, a5&#061;a5&#064;entry&#061;0, a6&#061;a6&#064;entry&#061;4294967295, nr&#061;202) at .\/nptl\/cancellation.c:49<br \/>\n#2  0x00007605dcaa09c7 in __futex_abstimed_wait_common64 (private&#061;128, futex_word&#061;0x7605dc9ffce8, expected&#061;&lt;optimized out&gt;, op&#061;265, abstime&#061;0x0, cancel&#061;true) at .\/nptl\/futex-internal.c:57<br \/>\n#3  __futex_abstimed_wait_common (futex_word&#061;0x7605dc9ffce8, expected&#061;&lt;optimized out&gt;, clockid&#061;0, abstime&#061;0x0, private&#061;128, cancel&#061;true) at .\/nptl\/futex-internal.c:87<br \/>\n#4  __GI___futex_abstimed_wait_cancelable64 (futex_word&#061;futex_word&#064;entry&#061;0x7605dc9ffce8, expected&#061;&lt;optimized out&gt;, clockid&#061;clockid&#064;entry&#061;0, abstime&#061;abstime&#064;entry&#061;0x0, private&#061;private&#064;entry&#061;128) at .\/nptl\/futex-internal.c:139<br \/>\n#5  0x00007605dcaa60b9 in __pthread_clockjoin_ex (threadid&#061;129767548384960, thread_return&#061;0x0, clockid&#061;0, abstime&#061;0x0, cancel&#061;&lt;optimized out&gt;) at .\/nptl\/pthread_join_common.c:66<br \/>\n#6  0x00007605dcef5f73 in std::thread::join() () from \/usr\/lib\/x86_64-linux-gnu\/libstdc&#043;&#043;.so.6<br \/>\n#7  0x00006241673de8b2 in threadCrash () at main.cpp:60<br \/>\n#8  0x00006241673dea0e in main (argc&#061;2, argv&#061;&lt;optimized out&gt;) at main.cpp:166<\/p>\n<p>Thread 1 (Thread 0x7605dc9ff6c0 (LWP 2681680)):<br \/>\n#0  operator() (__closure&#061;&lt;optimized out&gt;) at main.cpp:58<br \/>\n#1  std::__invoke_impl&lt;void, threadCrash()::&lt;lambda()&gt; &gt; (__f&#061;&#8230;) at \/usr\/include\/c&#043;&#043;\/15\/bits\/invoke.h:63<br \/>\n&#8230;&#8230;<br \/>\n(gdb) thread apply all bt full<\/p>\n<p>Thread 2 (Thread 0x7605dd180780 (LWP 2681679)):<br \/>\n#0  __syscall_cancel_arch () at ..\/sysdeps\/unix\/sysv\/linux\/x86_64\/syscall_cancel.S:56<br \/>\nNo locals.<br \/>\n#1  0x00007605dcaa05ec in __internal_syscall_cancel (a1&#061;a1&#064;entry&#061;129767548386536, a2&#061;&lt;optimized out&gt;, a3&#061;&lt;optimized out&gt;, a4&#061;a4&#064;entry&#061;0, a5&#061;a5&#064;entry&#061;0, a6&#061;a6&#064;entry&#061;4294967295, nr&#061;202) at .\/nptl\/cancellation.c:49<br \/>\n        result &#061; &lt;optimized out&gt;<br \/>\n        pd &#061; &lt;optimized out&gt;<br \/>\n        ch &#061; &lt;optimized out&gt;<br \/>\n#2  0x00007605dcaa09c7 in __futex_abstimed_wait_common64 (private&#061;128, futex_word&#061;0x7605dc9ffce8, expected&#061;&lt;optimized out&gt;, op&#061;265, abstime&#061;0x0, cancel&#061;true) at .\/nptl\/futex-internal.c:57<br \/>\n        resultvar &#061; &lt;optimized out&gt;<br \/>\n        __arg6 &#061; &lt;optimized out&gt;<br \/>\n&#8230;..<\/p>\n<p>(gdb) frame 0<br \/>\n#0  operator() (__closure&#061;&lt;optimized out&gt;) at main.cpp:58<br \/>\n58    *p &#061; 1;<br \/>\n(gdb) list<br \/>\n53}<br \/>\n54<br \/>\n55static NOINLINE void threadCrash() {<br \/>\n56  std::thread worker([] {<br \/>\n57    volatile int *p &#061; nullptr;<br \/>\n58    *p &#061; 1;<br \/>\n59  });<br \/>\n60  worker.join();<br \/>\n61}<br \/>\n62<br \/>\n(gdb) info locals<br \/>\np &#061; 0x0<br \/>\n(gdb) info reg<br \/>\nrax            0x6241673e0b90      108033044515728<br \/>\nrbx            0x62417240b020      108033229238304<br \/>\nrcx            0x7605dcaa3f3d      129767549058877<br \/>\nrdx            0x0                 0<br \/>\nrsi            0x7605dc9fffb0      129767548387248<br \/>\nrdi            0x62417240b020      108033229238304<br \/>\n(gdb) x\/20i $pc<br \/>\n&#061;&gt; 0x6241673de56a &lt;std::thread::_State_impl&lt;std::thread::_Invoker&lt;std::tuple&lt;threadCrash()::&lt;lambda()&gt; &gt; &gt; &gt;::_M_run(void)&#043;4&gt;:movl   $0x1,0x0<br \/>\n   0x6241673de575 &lt;std::thread::_State_impl&lt;std::thread::_Invoker&lt;std::tuple&lt;threadCrash()::&lt;lambda()&gt; &gt; &gt; &gt;::_M_run(void)&#043;15&gt;:ret<br \/>\n   0x6241673de576 &lt;mmapOob()&gt;:endbr64<br \/>\n   0x6241673de57a &lt;mmapOob()&#043;4&gt;:push   %rbp<br \/>\n   0x6241673de57b &lt;mmapOob()&#043;5&gt;:mov    %rsp,%rbp<br \/>\n   0x6241673de57e &lt;mmapOob()&#043;8&gt;:push   %r12<br \/>\n   0x6241673de580 &lt;mmapOob()&#043;10&gt;:push   %rbx<br \/>\n   0x6241673de581 &lt;mmapOob()&#043;11&gt;:mov    $0x1e,%edi<br \/>\n   0x6241673de586 &lt;mmapOob()&#043;16&gt;:call   0x6241673de220 &lt;sysconf&#064;plt&gt;<br \/>\n   0x6241673de58b &lt;mmapOob()&#043;21&gt;:test   %rax,%rax<br \/>\n   0x6241673de58e &lt;mmapOob()&#043;24&gt;:jle    0x6241673de5e7 &lt;mmapOob()&#043;113&gt;<br \/>\n   0x6241673de590 &lt;mmapOob()&#043;26&gt;:mov    %rax,%r12<br \/>\n   0x6241673de593 &lt;mmapOob()&#043;29&gt;:lea    (%rax,%rax,1),%rsi<br \/>\n   0x6241673de597 &lt;mmapOob()&#043;33&gt;:mov    $0x0,%r9d<br \/>\n   0x6241673de59d &lt;mmapOob()&#043;39&gt;:mov    $0xffffffff,%r8d<br \/>\n   0x6241673de5a3 &lt;mmapOob()&#043;45&gt;:mov    $0x22,%ecx<br \/>\n   0x6241673de5a8 &lt;mmapOob()&#043;50&gt;:mov    $0x0,%edx<br \/>\n   0x6241673de5ad &lt;mmapOob()&#043;55&gt;:mov    $0x0,%edi<br \/>\n   0x6241673de5b2 &lt;mmapOob()&#043;60&gt;:call   0x6241673de310 &lt;mmap&#064;plt&gt;<br \/>\n   0x6241673de5b7 &lt;mmapOob()&#043;65&gt;:mov    %rax,%rbx<br \/>\n(gdb) p $_siginfo._sifields._sigfault.si_addr<br \/>\n$1 &#061; (void *) 0x0<br \/>\n(gdb) <\/p>\n<p>\u7ebf\u7a0b\u547d\u4ee4\u5bf9\u5e94\u7740\u4e0a\u9762\u7684\u4e24\u4eba\u4e2a\u7ebf\u7a0bID&#xff0c;\u5e26\u661f\u53f7\u8868\u793a\u6b63\u5728\u6b64\u7ebf\u7a0b\u4e2d\u3002\u8fd9\u4e2a\u7ebf\u7a0b\u5d29\u6e83\u7684\u4ee3\u7801\u592a\u7b80\u5355\u6240\u4ee5\u76f4\u63a5\u5728GDB\u4e2d\u53ef\u4ee5\u770b\u51fa\u6765&#xff0c;\u800c\u4e0d\u5fc5\u5206\u6790\u5404\u79cd\u53d8\u91cf\u548c\u5185\u5b58\u3002\u4f46\u65b9\u6cd5\u7ed9\u51fa\u4e86&#xff0c;\u518d\u5305\u62ec\u524d\u9762\u7528AI\u5206\u6790\u8f85\u52a9\u7684\u65b9\u5f0f&#xff0c;\u5176\u5b9e\u5c31\u5f88\u5bb9\u6613\u5b9a\u4f4d\u76f8\u5173\u7684\u95ee\u9898\u6240\u5728\u4f4d\u7f6e\u4e86\u3002<\/p>\n<p>\u4e5f\u53ef\u4ee5\u4f7f\u7528\u5de5\u5177&#xff1a;<\/p>\n<p>valgrind   &#8211;tool&#061;memcheck   &#8211;track-origins&#061;yes   &#8211;leak-check&#061;full   &#8211;show-leak-kinds&#061;all   &#8211;keep-stacktraces&#061;alloc-and-free   &#8211;error-exitcode&#061;99   .\/crash_demo heapOob<br \/>\n&#061;&#061;2678521&#061;&#061; Memcheck, a memory error detector<br \/>\n&#061;&#061;2678521&#061;&#061; Copyright (C) 2002-2024, and GNU GPL&#039;d, by Julian Seward et al.<br \/>\n&#061;&#061;2678521&#061;&#061; Using Valgrind-3.26.0 and LibVEX; rerun with -h for copyright info<br \/>\n&#061;&#061;2678521&#061;&#061; Command: .\/crash_demo heapOob<br \/>\n&#061;&#061;2678521&#061;&#061;<br \/>\nrunning: heapOob<br \/>\n&#061;&#061;2678521&#061;&#061; Invalid write of size 4<br \/>\n&#061;&#061;2678521&#061;&#061;    at 0x40027B3: heapOob() (main.cpp:28)<br \/>\n&#061;&#061;2678521&#061;&#061;    by 0x4002A0D: main (main.cpp:166)<br \/>\n&#061;&#061;2678521&#061;&#061;  Address 0x4eab0a0 is 0 bytes after a block of size 32 alloc&#039;d<br \/>\n&#061;&#061;2678521&#061;&#061;    at 0x48535F3: operator new[](unsigned long) (vg_replace_malloc.c:730)<br \/>\n&#061;&#061;2678521&#061;&#061;    by 0x4002779: heapOob() (main.cpp:27)<br \/>\n&#061;&#061;2678521&#061;&#061;    by 0x4002A0D: main (main.cpp:166)<br \/>\n&#061;&#061;2678521&#061;&#061;<br \/>\nreturned without an immediate crash; use ASan\/Valgrind<br \/>\n&#061;&#061;2678521&#061;&#061;<br \/>\n&#061;&#061;2678521&#061;&#061; HEAP SUMMARY:<br \/>\n&#061;&#061;2678521&#061;&#061;     in use at exit: 0 bytes in 0 blocks<br \/>\n&#061;&#061;2678521&#061;&#061;   total heap usage: 2 allocs, 2 frees, 73,760 bytes allocated<br \/>\n&#061;&#061;2678521&#061;&#061;<br \/>\n&#061;&#061;2678521&#061;&#061; All heap blocks were freed &#8212; no leaks are possible<br \/>\n&#061;&#061;2678521&#061;&#061;<br \/>\n&#061;&#061;2678521&#061;&#061; For lists of detected and suppressed errors, rerun with: -s<br \/>\n&#061;&#061;2678521&#061;&#061; ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)<\/p>\n<p>\u901a\u8fc7\u4e0a\u9762\u5206\u6790\u53ef\u4ee5\u770b\u51fa&#xff0c;\u7ed9\u51fa\u4e86\u201c2678521 Invalid write of size 4\u201d&#xff0c;\u5199\u5165\u4e86\u56db\u4e2a\u5b57\u8282\u3002\u4f4d\u7f6e\u5728main.cpp\u7684\u7b2c28\u884c\u7684heapOob\u51fd\u6570\u4e2d\u3002\u8d8a\u754c\u7684\u5730\u5740\u662f\u201c2678521  Address 0x4eab0a0 is 0 bytes after a block of size 32 alloc\u2019d\u201d\u3002\u7a0b\u5e8f\u8fd8\u6253\u5370\u4e86\u201creturned without an immediate crash; use ASan\/Valgrind\u201d\u3002\u8fd9\u662f\u56e0\u4e3a\u5c0f\u8303\u56f4\u8d8a\u754cglibc\u7684\u5806chunk\u6709\u5bf9\u9f50\u548c\u586b\u5145&#xff0c;\u5b9e\u9645\u5360\u7528\u7684\u7a7a\u95f4\u53ef\u80fd\u66f4\u5927&#xff0c;\u800c\u8fd9\u56db\u4e2a\u5b57\u8282\u53ef\u80fd\u5728\u8fd9\u5176\u4e2d&#xff0c;\u6240\u4ee5\u6ca1\u6709\u7834\u574f\u5230chunk\u6216\u4e0b\u4e00\u4e2a\u7684\u6307\u9488\u3002\u6545\u800c\u7a0b\u5e8f\u5f97\u4ee5\u6b63\u5e38\u7ec8\u6b62\u3002\u5f88\u6e05\u6670\u7684\u8bf4\u660e\u3002<br \/>\n\u5982\u679c\u662f\u4f7f\u7528ASan\u6216UBSan\u5206\u6790&#xff0c;\u5219\u5fc5\u987b\u4f7f\u7528\u4e0b\u9762\u7684\u7f16\u8bd1\u65b9\u5f0f\u91cd\u65b0\u7f16\u8bd1&#xff1a;<\/p>\n<p>g&#043;&#043; -std&#061;c&#043;&#043;17 \\\\<br \/>\n  -g3 -O1 \\\\<br \/>\n  -fno-omit-frame-pointer \\\\<br \/>\n  -fno-optimize-sibling-calls \\\\<br \/>\n  -fsanitize&#061;address,undefined \\\\<br \/>\n  -pthread \\\\<br \/>\n  main.cpp \\\\<br \/>\n  -o crash_demo_asan<\/p>\n<p>\u8fd0\u884c\u547d\u4ee4&#xff1a;<\/p>\n<p>ASAN_OPTIONS&#061;detect_stack_use_after_return&#061;1:abort_on_error&#061;1:strict_string_checks&#061;1 .\/crash_demo_asan doubleFree<br \/>\nrunning: doubleFree<br \/>\n&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<br \/>\n&#061;&#061;2679167&#061;&#061;ERROR: AddressSanitizer: attempting double-free on 0x77f185be0040 in thread T0:<br \/>\n    #0 0x7b318792a3ff in free ..\/..\/..\/..\/src\/libsanitizer\/asan\/asan_malloc_linux.cpp:51<br \/>\n    #1 0x60b23926fc6d in opaqueFree \/home\/qt65_project\/crashDumpTest\/main.cpp:67<br \/>\n    #2 0x60b23926fc9e in doubleFree \/home\/qt65_project\/crashDumpTest\/main.cpp:76<br \/>\n    #3 0x60b239270fca in main \/home\/qt65_project\/crashDumpTest\/main.cpp:166<br \/>\n    #4 0x7b318682a600 in __libc_start_call_main ..\/sysdeps\/nptl\/libc_start_call_main.h:59<br \/>\n    #5 0x7b318682a717 in __libc_start_main_impl ..\/csu\/libc-start.c:360<br \/>\n    #6 0x60b23926f664 in _start (\/home\/qt65_project\/crashDumpTest\/crash_demo_asan&#043;0x6664) (BuildId: 4801c09f88806c865e61592e1cb0dbe35b9397c3)<\/p>\n<p>0x77f185be0040 is located 0 bytes inside of 128-byte region [0x77f185be0040,0x77f185be00c0)<br \/>\nfreed by thread T0 here:<br \/>\n    #0 0x7b318792a3ff in free ..\/..\/..\/..\/src\/libsanitizer\/asan\/asan_malloc_linux.cpp:51<br \/>\n    #1 0x60b23926fc6d in opaqueFree \/home\/qt65_project\/crashDumpTest\/main.cpp:67<br \/>\n    #2 0x60b23926fc96 in doubleFree \/home\/qt65_project\/crashDumpTest\/main.cpp:75<br \/>\n    #3 0x60b239270fca in main \/home\/qt65_project\/crashDumpTest\/main.cpp:166<br \/>\n    #4 0x7b318682a600 in __libc_start_call_main ..\/sysdeps\/nptl\/libc_start_call_main.h:59<br \/>\n    #5 0x7b318682a717 in __libc_start_main_impl ..\/csu\/libc-start.c:360<br \/>\n    #6 0x60b23926f664 in _start (\/home\/qt65_project\/crashDumpTest\/crash_demo_asan&#043;0x6664) (BuildId: 4801c09f88806c865e61592e1cb0dbe35b9397c3)<\/p>\n<p>previously allocated by thread T0 here:<br \/>\n    #0 0x7b318792b60f in malloc ..\/..\/..\/..\/src\/libsanitizer\/asan\/asan_malloc_linux.cpp:67<br \/>\n    #1 0x60b23926fc86 in doubleFree \/home\/qt65_project\/crashDumpTest\/main.cpp:71<br \/>\n    #2 0x60b239270fca in main \/home\/qt65_project\/crashDumpTest\/main.cpp:166<br \/>\n    #3 0x7b318682a600 in __libc_start_call_main ..\/sysdeps\/nptl\/libc_start_call_main.h:59<br \/>\n    #4 0x7b318682a717 in __libc_start_main_impl ..\/csu\/libc-start.c:360<br \/>\n    #5 0x60b23926f664 in _start (\/home\/qt65_project\/crashDumpTest\/crash_demo_asan&#043;0x6664) (BuildId: 4801c09f88806c865e61592e1cb0dbe35b9397c3)<\/p>\n<p>SUMMARY: AddressSanitizer: double-free \/home\/qt65_project\/crashDumpTest\/main.cpp:67 in opaqueFree<br \/>\n&#061;&#061;2679167&#061;&#061;ABORTING<br \/>\n\u5df2\u4e2d\u6b62                  ASAN_OPTIONS&#061;detect_stack_use_after_return&#061;1:abort_on_error&#061;1:strict_string_checks&#061;1 .\/crash_demo_asan doubleFree<\/p>\n<p>\u8fd0\u884c\u7ed3\u679c\u7684\u5f00\u59cb\u5c31\u544a\u8bc9\u8fd9\u662f\u4e00\u4e2a\u4e8c\u6b21\u91ca\u653e\u7684\u95ee\u9898&#xff0c;\u95ee\u9898\u7684\u4f4d\u7f6e\u5728opaqueFree\u51fd\u6570\u5373main.cpp\u768467\u884c\u3002\u7b2c\u4e8c\u6b21\u91ca\u653e\u572876\u884c&#xff0c;\u4e5f\u662f\u8c03\u7528\u8fd9\u4e2a\u51fd\u6570\u3002\u800c\u7b2c\u4e00\u6b21\u91ca\u653e\u5219\u5728doubleFree\u51fd\u6570\u7684\u7b2c75\u884c\u3002\u4e0a\u9762\u7684\u63d0\u793a\u975e\u5e38\u6e05\u6670\u3002<br \/>\n\u66f4\u591a\u7684\u5de5\u5177\u5982TSan&#xff08;\u6027\u80fd\u5f00\u9500\u5927&#xff0c;\u5185\u5b58\u9700\u8981\u9ad8&#xff0c;\u4e00\u822c\u63a8\u8350\u53ea\u5728\u5f00\u53d1\u548c\u6d4b\u8bd5\u73af\u5883\u4e2d\u4f7f\u7528&#xff09;\u5219\u7b49\u8bf7\u81ea\u884c\u67e5\u9605\u76f8\u5173\u8d44\u6599\u5904\u7406\u3002<\/p>\n<h3>\u4e94\u3001\u603b\u7ed3<\/h3>\n<p>\u5185\u5b58\u95ee\u9898\u867d\u7136\u662f\u4e00\u4e2a\u5927\u95ee\u9898&#xff0c;\u4f46\u5728\u5b9e\u8df5\u4e2d\u5df2\u7ecf\u79ef\u805a\u4e86\u5f88\u591a\u5e74\u7684\u5e94\u5bf9\u7ecf\u9a8c&#xff0c;\u5de5\u5177\u4e5f\u5341\u5206\u4e30\u5bcc\u3002\u8fd9\u6837&#xff0c;\u5728\u89e3\u51b3\u5185\u5b58\u7684\u5806\u6808\u6ea2\u51fa\u8d8a\u754c\u7684\u95ee\u9898\u65f6&#xff0c;\u53ef\u4ee5\u91c7\u7eb3\u7684\u65b9\u6cd5\u6709\u5f88\u591a\u3002\u800c\u4e14\u4e0d\u540c\u7684\u5e73\u53f0\u53ef\u80fd\u4e5f\u6709\u4e0d\u540c\u7684\u5de5\u5177\u548c\u673a\u5236&#xff0c;\u8fd9\u5c31\u9700\u8981\u5f00\u53d1\u8005\u56e0\u5730\u5236\u5b9c\u7684\u9009\u62e9\u548c\u4f7f\u7528\u6070\u5f53\u7684\u5de5\u5177&#xff0c;\u5c31\u80fd\u591f\u8f83\u4e3a\u5feb\u901f\u7684\u5b9a\u4f4d\u548c\u89e3\u51b3\u5185\u5b58\u7684\u95ee\u9898\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u5185\u5b58\u8d8a\u754c<br \/>\n\u5185\u5b58\u7684\u95ee\u9898\u662fc\/c\u7684\u4f20\u7edf\u7684\u3001\u7ecf\u5178\u7684\u95ee\u9898\u3002\u4ece\u4e0d\u540c\u7684\u7ef4\u5ea6\u548c\u4e0d\u540c\u7684\u5c42\u6b21\u90fd\u53ef\u4ee5\u770b\u5230\u4e0d\u4e00\u6837\u7684\u60c5\u51b5\u3002\u5bf9\u4e8e\u4e00\u4e9b\u4e0d\u592a\u719f\u6089\u8c03\u8bd5\u7684\u5f00\u53d1\u8005\u6765\u8bf4&#xff0c;\u5806\u548c\u6808\u7684\u5d29\u6e83\u5728\u4ed6\u4eec\u773c\u4e2d\u90fd\u662f\u4e00\u6837\u7684&#xff0c;\u53cd\u6b63\u7ed3\u679c\u90fd\u662f\u5d29\u6e83\u7684\u3002\u4f46\u5728\u5b9e\u9645\u7684\u5e94\u7528\u4e2d&#xff0c;\u6709\u7ecf\u9a8c\u7684\u5f00\u53d1\u8005\u53ef\u4ee5\u8fc5\u901f\u7684\u6839\u636e\u60c5\u51b5\u5224\u522b\u662f\u5806\u8fd8\u662f\u6808\u5f15\u8d77\u7684\u8d8a\u754c\u5d29\u6e83\u3002<br \/>\n\u6b63\u5982\u524d\u9762\u53cd\u590d\u63d0\u5230\u7684&#xff0c;\u89e3\u51b3\u95ee\u9898\u7684\u5173\u952e\u4e0d\u662f\u4e00\u773c\u53d1\u73b0\u95ee\u9898&#xff0c;\u800c\u662f\u5b66\u4f1a\u9010\u6b65\u62bd\u4e1d\u5265\u8327\u7684\u80fd\u529b&#xff0c;\u4e00\u6b65\u6b65\u7684\u5b9a\u4f4d\u95ee\u9898\u7684\u7b56\u7565\u3002\u6709\u4e86\u89e3\u51b3\u95ee\u9898\u7684\u601d\u8def\u548c<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[55],"topic":[],"class_list":["post-115170","post","type-post","status-publish","format-standard","hentry","category-server","tag-c"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>c++\u7f16\u7a0b\u5b9e\u8df5\u2014\u5806\u548c\u6808\u8d8a\u754c\u8c03\u8bd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/115170.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"c++\u7f16\u7a0b\u5b9e\u8df5\u2014\u5806\u548c\u6808\u8d8a\u754c\u8c03\u8bd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4e00\u3001\u5185\u5b58\u8d8a\u754c \u5185\u5b58\u7684\u95ee\u9898\u662fc\/c\u7684\u4f20\u7edf\u7684\u3001\u7ecf\u5178\u7684\u95ee\u9898\u3002\u4ece\u4e0d\u540c\u7684\u7ef4\u5ea6\u548c\u4e0d\u540c\u7684\u5c42\u6b21\u90fd\u53ef\u4ee5\u770b\u5230\u4e0d\u4e00\u6837\u7684\u60c5\u51b5\u3002\u5bf9\u4e8e\u4e00\u4e9b\u4e0d\u592a\u719f\u6089\u8c03\u8bd5\u7684\u5f00\u53d1\u8005\u6765\u8bf4&#xff0c;\u5806\u548c\u6808\u7684\u5d29\u6e83\u5728\u4ed6\u4eec\u773c\u4e2d\u90fd\u662f\u4e00\u6837\u7684&#xff0c;\u53cd\u6b63\u7ed3\u679c\u90fd\u662f\u5d29\u6e83\u7684\u3002\u4f46\u5728\u5b9e\u9645\u7684\u5e94\u7528\u4e2d&#xff0c;\u6709\u7ecf\u9a8c\u7684\u5f00\u53d1\u8005\u53ef\u4ee5\u8fc5\u901f\u7684\u6839\u636e\u60c5\u51b5\u5224\u522b\u662f\u5806\u8fd8\u662f\u6808\u5f15\u8d77\u7684\u8d8a\u754c\u5d29\u6e83\u3002 \u6b63\u5982\u524d\u9762\u53cd\u590d\u63d0\u5230\u7684&#xff0c;\u89e3\u51b3\u95ee\u9898\u7684\u5173\u952e\u4e0d\u662f\u4e00\u773c\u53d1\u73b0\u95ee\u9898&#xff0c;\u800c\u662f\u5b66\u4f1a\u9010\u6b65\u62bd\u4e1d\u5265\u8327\u7684\u80fd\u529b&#xff0c;\u4e00\u6b65\u6b65\u7684\u5b9a\u4f4d\u95ee\u9898\u7684\u7b56\u7565\u3002\u6709\u4e86\u89e3\u51b3\u95ee\u9898\u7684\u601d\u8def\u548c\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/115170.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-11T03:40:52+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/115170.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/115170.html\",\"name\":\"c++\u7f16\u7a0b\u5b9e\u8df5\u2014\u5806\u548c\u6808\u8d8a\u754c\u8c03\u8bd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-11T03:40:52+00:00\",\"dateModified\":\"2026-10-11T03:40:52+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/115170.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/115170.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/115170.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"c++\u7f16\u7a0b\u5b9e\u8df5\u2014\u5806\u548c\u6808\u8d8a\u754c\u8c03\u8bd5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"c++\u7f16\u7a0b\u5b9e\u8df5\u2014\u5806\u548c\u6808\u8d8a\u754c\u8c03\u8bd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/115170.html","og_locale":"zh_CN","og_type":"article","og_title":"c++\u7f16\u7a0b\u5b9e\u8df5\u2014\u5806\u548c\u6808\u8d8a\u754c\u8c03\u8bd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4e00\u3001\u5185\u5b58\u8d8a\u754c \u5185\u5b58\u7684\u95ee\u9898\u662fc\/c\u7684\u4f20\u7edf\u7684\u3001\u7ecf\u5178\u7684\u95ee\u9898\u3002\u4ece\u4e0d\u540c\u7684\u7ef4\u5ea6\u548c\u4e0d\u540c\u7684\u5c42\u6b21\u90fd\u53ef\u4ee5\u770b\u5230\u4e0d\u4e00\u6837\u7684\u60c5\u51b5\u3002\u5bf9\u4e8e\u4e00\u4e9b\u4e0d\u592a\u719f\u6089\u8c03\u8bd5\u7684\u5f00\u53d1\u8005\u6765\u8bf4&#xff0c;\u5806\u548c\u6808\u7684\u5d29\u6e83\u5728\u4ed6\u4eec\u773c\u4e2d\u90fd\u662f\u4e00\u6837\u7684&#xff0c;\u53cd\u6b63\u7ed3\u679c\u90fd\u662f\u5d29\u6e83\u7684\u3002\u4f46\u5728\u5b9e\u9645\u7684\u5e94\u7528\u4e2d&#xff0c;\u6709\u7ecf\u9a8c\u7684\u5f00\u53d1\u8005\u53ef\u4ee5\u8fc5\u901f\u7684\u6839\u636e\u60c5\u51b5\u5224\u522b\u662f\u5806\u8fd8\u662f\u6808\u5f15\u8d77\u7684\u8d8a\u754c\u5d29\u6e83\u3002 \u6b63\u5982\u524d\u9762\u53cd\u590d\u63d0\u5230\u7684&#xff0c;\u89e3\u51b3\u95ee\u9898\u7684\u5173\u952e\u4e0d\u662f\u4e00\u773c\u53d1\u73b0\u95ee\u9898&#xff0c;\u800c\u662f\u5b66\u4f1a\u9010\u6b65\u62bd\u4e1d\u5265\u8327\u7684\u80fd\u529b&#xff0c;\u4e00\u6b65\u6b65\u7684\u5b9a\u4f4d\u95ee\u9898\u7684\u7b56\u7565\u3002\u6709\u4e86\u89e3\u51b3\u95ee\u9898\u7684\u601d\u8def\u548c","og_url":"https:\/\/www.wsisp.com\/helps\/115170.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-11T03:40:52+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"11 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/115170.html","url":"https:\/\/www.wsisp.com\/helps\/115170.html","name":"c++\u7f16\u7a0b\u5b9e\u8df5\u2014\u5806\u548c\u6808\u8d8a\u754c\u8c03\u8bd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-11T03:40:52+00:00","dateModified":"2026-10-11T03:40:52+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/115170.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/115170.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/115170.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"c++\u7f16\u7a0b\u5b9e\u8df5\u2014\u5806\u548c\u6808\u8d8a\u754c\u8c03\u8bd5"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/115170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=115170"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/115170\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=115170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=115170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=115170"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=115170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}