{"author_url":"https://blog.hatena.ne.jp/iww/","author_name":"iww","provider_url":"https://hatena.blog","version":"1.0","width":"100%","image_url":"https://cdn.user.blog.st-hatena.com/default_entry_og_image/42132/1685946694840016","description":"gcc\u3067\u3001\u30b9\u30ec\u30c3\u30c9\u9593\u3067\u540c\u3058\u30e1\u30e2\u30ea\u3092\u540c\u6642\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u308b\u4eba\u3092\u63a2\u3057\u3066\u3076\u3063\u6bba\u3057\u305f\u3044\u3002\u305d\u306e\u305f\u3081\u306b\u306fgcc\u306e TSAN\uff08Thread Sanitizer\uff09\u6a5f\u80fd\u3092\u4f7f\u3046 -fsanitize=thread \u30bd\u30fc\u30b9 #include <pthread.h> #include <stdio.h> volatile long long A=0; void *gettidtest( void *arg ) { int number = (int)(long) arg; long long i; printf(\"thread=%d start\\n\", number); for(i=0;i<1000000LL;i++)\u2026","blog_title":"\u63ee\u767a\u6027\u306e\u30e1\u30e2\uff12","url":"https://iww.hateblo.jp/entry/20240326/atomic_heart","blog_url":"https://iww.hateblo.jp/","title":" gcc\u3067\u3001\u30b9\u30ec\u30c3\u30c9\u9593\u3067\u540c\u3058\u30e1\u30e2\u30ea\u3092\u540c\u6642\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u308b\u4eba\u3092\u63a2\u3057\u3066\u3076\u3063\u6bba\u3057\u305f\u3044","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fiww.hateblo.jp%2Fentry%2F20240326%2Fatomic_heart\" title=\" gcc\u3067\u3001\u30b9\u30ec\u30c3\u30c9\u9593\u3067\u540c\u3058\u30e1\u30e2\u30ea\u3092\u540c\u6642\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u308b\u4eba\u3092\u63a2\u3057\u3066\u3076\u3063\u6bba\u3057\u305f\u3044 - \u63ee\u767a\u6027\u306e\u30e1\u30e2\uff12\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":["C","Linux"],"type":"rich","height":"190","provider_name":"Hatena Blog","published":"2024-03-26 08:00:00"}