c - Is this enough to detect race conditions? -


say have multithreaded application , run same inputs. enough instrument every load , stores detect write-write , write-read data races? mean logged load , store addresses, if can see thread did load , thread did store, can detect write-read , write-write data race noticing overlapped addresses. or missing something?

or missing something?

you are missing lot. pubby said, if see read, write in t1, , later read, write in t2, can't anything absence of races. need know locks involved.

you may want use tool, such google's threadsanitizer instead.

update:

but approach cover races or @ least of races?

your comments here , on other answers appear show don't understand race is.

your approach may expose some of races, yes. guaranteed not cover of them (which make exercise futile).


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -