<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>ThreadSanitizer on PlumePHP</title><link>https://plumephp.com/tags/threadsanitizer/</link><description>Recent content in ThreadSanitizer on PlumePHP</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Thu, 13 Aug 2026 10:00:00 +0800</lastBuildDate><atom:link href="https://plumephp.com/tags/threadsanitizer/index.xml" rel="self" type="application/rss+xml"/><item><title>Go 竞态检测器深度解析：happens-before、Vector Clock 与生产环境实践</title><link>https://plumephp.com/125-go-race-detector/</link><pubDate>Thu, 13 Aug 2026 10:00:00 +0800</pubDate><guid>https://plumephp.com/125-go-race-detector/</guid><description>&lt;h2 id="为什么竞态检测是并发编程的必修课"&gt;为什么竞态检测是并发编程的必修课&lt;/h2&gt;
&lt;p&gt;Go 语言以简洁的并发原语著称，goroutine、channel 和 &lt;code&gt;sync&lt;/code&gt; 包让高并发程序的开发成本大幅降低。但这种简洁性也带来了一个副作用：开发者很容易在不经意间写出存在 data race 的代码。data race 不会每次运行都触发崩溃，它可能表现为间歇性的数据异常、逻辑偏差，或者在最坏的情况下悄无声息地破坏内存结构。据统计，Go 语言在 GitHub 上的 issue 中，与并发安全相关的 bug 报告占比超过 15%，其中相当比例都与 data race 有关。&lt;/p&gt;</description></item></channel></rss>