Valgrind has a race-detection tool named Helgrind, but you're almost certainly better off using ThreadSanitizer, which is a similar race-detection tool that comes with clang and has wider use within Mozilla.

Helgrind intercepts calls to many POSIX pthreads functions, and is therefore able to report on various common problems. Although these are unglamourous errors, their presence can lead to undefined program behaviour and hard-to-find bugs later on. The detected errors are: unlocking an invalid mutex unlocking a not-locked mutex unlocking a mutex held by a different thread destroying an invalid or a
I recently ran the gold linker under Thread Sanitizer. It’s a nice plugin for Valgrind which looks for race conditions in multi-threaded programs. To describe it briefly, it builds Happens-Before relationships based on mutex operations and warns when it notices a write and a read/write to the same memory location without a Happens-Before relationship. This approach can yield false positives to be
Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at
あんま深く考えず valgrind を Ruby の head のテストに適用してみたところ、結構もにょもにょ漏れてるもんだなぁと気付いたので、いくつか修正してみたりしたのですが、その時案外困るのが、リークする最小のコードが簡単に作れない、ってことでした。 valgrind は C 言語的にどこで malloc を呼んだかは教えてくれるものの、 Ruby コードでどこだったかは教えてくれないからです。修正はできたけど具体的にどこで漏れてるかはよくわからん、ということさえありました。 というわけで、 Ruby 的にどこで漏れたかを教えてくれる valgrind 用の tool 、 Rubygrind を作ってみました。 http://shinh.skr.jp/binary/rmemcheck.tgz これを valgrind-3.3.1 のディレクトリに展開して、 > diff -u con
ubuntu% uname -a Linux ubuntu 2.6.12-10-386 #1 Sat Mar 11 16:13:17 UTC 2006 i686 GNU/Linux ubuntu% valgrind --version valgrind-3.0.1 (0) 目次 Valgrindに含まれるツール Memcheck: メモリエラーを検出する(default) Cachegrind: キャッシュミスを検出する Massif: ヒーププロファイラを使う まとめ valgrindの使い方とエラーメッセージを整理してみた。「valgrind --leak-check=full command」というコマンドラインをよく用いる。これによりメモリ周りのバグを検出出来る。 --tool=cachegrindではプログラム実行時のキャッシュミス率を測定する事が出来る。cg_annotateを
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く