This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How does address sanitizer handle read-modify-write memory access?


Hello!

c-c++-common/asan/null-deref-1.c test can generate read-modify-write
instruction ("incl 40(%eax)") when compiled with -Os. However,
address-sanitizer only calls __asan_report_load4 in this case. With
-O2, load of value, modification and store are different instructions,
and address-sanitizer calls __asan_report_load4 and
__asan_report_store4.

BTW: This testcase currently fails on x32 [1], but I don't have x32
runtime to investigate runtime failure further.

[1] http://gcc.gnu.org/ml/gcc-testresults/2012-12/msg01227.html

Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]