http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55309
--- Comment #21 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-06 12:48:39 UTC --- As the shadow memory doesn't have information about what locations are read-only, it only has info whether the relevant bytes are valid, or invalid (or some invalid, some valid), and for all invalid a few magic values for more detailed reporting. So, if you have a RMW statement, without any asan optimization it will first check the read, and already fail on the read, so even with the optimization if you just check the read and not the write, the user visible behavior will be exactly the same.