[PATCH] Enable -fsanitize-recover for KASan

Andrey Ryabinin a.ryabinin@samsung.com
Fri Sep 5 09:05:00 GMT 2014

On 09/05/2014 10:54 AM, Yury Gribov wrote:
> Hi all,
> This patch enables -fsanitize-recover for KASan by default. This causes KASan to continue execution after error in case of inline instrumentation. This feature is needed because
> - reports during early bootstrap won't even be printed
> - needed to run all tests w/o rebooting machine for every test
> - needed for interactive work on desktop

I just add that this option is required for inline instrumentation in kernel.
There is some places in kernel where we validly touch poisoned memory
and we need to disable error reporting in runtime. For that we use per task variable and check it
__asan_report function and don't print anything if flag is raised.
So there is must be the way to return from report functions.

And how does it work if someone wants to try -fsanitize=address -fsanitize-recover.
Seems you didn't touch libsanitzer in this patch, so I guess this will cause link time error, right ?

> Bootstrapped and regtested on x64.
> Ok to commit?
> -Y

More information about the Gcc-patches mailing list