Hello, The three patches following up this message implement instrumenting memory access builtins calls in AddressSanitizer, like what the llvm implementation does.
The first two patches do some factorizing that is used by the third one. I have split them up like this to ease the review and to ensure that applying them up one by one keeps the tree in a build-able state. As we don't yet seem to have have a test harness on the tree, I have tested the patches by starring at the gimple outputs and by bootstrapping the tree for basic sanity. This is my first foray in gimple and middle-end land, so I guess some apologies are due in advance for the barbarisms you might find in these patches. Below is the summary of the changes. Thank you in advance. [asan] Make build_check_stmt accept an SSA_NAME for its base [asan] Factorize condition insertion code out of build_check_stmt [asan] Instrument built-in memory access function calls gcc/asan.c | 482 +++++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 419 insertions(+), 63 deletions(-) -- Dodji