<s>
A	O
code	O
sanitizer	O
is	O
a	O
programming	O
tool	O
that	O
detects	O
bugs	B-Error_Name
in	O
the	O
form	O
of	O
undefined	O
or	O
suspicious	O
behavior	O
by	O
a	O
compiler	B-Language
inserting	O
instrumentation	B-Application
code	O
at	O
runtime	O
.	O
</s>
<s>
The	O
class	O
of	O
tools	O
was	O
first	O
introduced	O
by	O
Google	O
's	O
AddressSanitizer	B-Application
(	O
or	O
ASan	O
)	O
of	O
2012	O
,	O
which	O
uses	O
directly	O
mapped	O
shadow	B-General_Concept
memory	I-General_Concept
to	O
detect	O
memory	B-General_Concept
corruption	I-General_Concept
such	O
as	O
buffer	B-General_Concept
overflows	I-General_Concept
or	O
accesses	O
to	O
a	O
dangling	B-Error_Name
pointer	I-Error_Name
(	O
use-after-free	B-Error_Name
)	O
.	O
</s>
<s>
Google	O
's	O
ASan	O
,	O
introduced	O
in	O
2012	O
,	O
uses	O
a	O
shadow	B-General_Concept
memory	I-General_Concept
scheme	O
to	O
detect	O
memory	O
bugs	B-Error_Name
.	O
</s>
<s>
MSVC	B-Application
(	O
widely	O
available	O
starting	O
from	O
version	O
16.9	O
)	O
.	O
</s>
<s>
On	O
average	O
,	O
the	O
instrumentation	B-Application
increases	O
processing	O
time	O
by	O
about	O
73%	O
and	O
memory	O
usage	O
by	O
240%	O
.	O
</s>
<s>
AddressSanitizer	B-Application
does	O
not	O
detect	O
any	O
uninitialized	B-Error_Name
memory	I-Error_Name
reads	O
(	O
but	O
this	O
is	O
detected	O
by	O
MemorySanitizer	O
)	O
,	O
and	O
only	O
detects	O
some	O
use-after-return	O
bugs	B-Error_Name
.	O
</s>
<s>
It	O
is	O
also	O
not	O
capable	O
of	O
detecting	O
all	O
arbitrary	O
memory	B-General_Concept
corruption	I-General_Concept
bugs	B-Error_Name
,	O
nor	O
all	O
arbitrary	O
write	O
bugs	B-Error_Name
due	O
to	O
integer	O
underflow/overflows	O
(	O
when	O
the	O
integer	O
with	O
undefined	B-Language
behavior	I-Language
is	O
used	O
to	O
calculate	O
memory	O
address	O
offsets	O
)	O
.	O
</s>
<s>
The	O
KernelAddressSanitizer	O
(	O
KASan	O
)	O
detects	O
dynamic	O
memory	O
errors	O
in	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
.	O
</s>
<s>
Kernel	B-Operating_System
instrumentation	B-Application
requires	O
a	O
special	O
feature	O
in	O
the	O
compiler	B-Language
supplying	O
the	O
-fsanitize	O
=	O
kernel-address	O
command	O
line	O
option	O
,	O
since	O
kernels	B-Operating_System
do	O
not	O
use	O
the	O
same	O
address	O
space	O
as	O
normal	O
programs	O
.	O
</s>
<s>
Google	O
also	O
produced	O
LeakSanitizer	O
(	O
LSan	O
,	O
memory	B-Error_Name
leaks	I-Error_Name
)	O
,	O
ThreadSanitizer	O
(	O
TSan	O
,	O
data	O
races	O
and	O
deadlocks	B-Operating_System
)	O
,	O
MemorySanitizer	O
(	O
MSan	O
,	O
uninitialized	B-Error_Name
memory	I-Error_Name
)	O
,	O
and	O
UndefinedBehaviorSanitizer	O
(	O
UBSan	O
,	O
undefined	B-Language
behaviors	I-Language
,	O
with	O
fine-grained	O
control	O
)	O
.	O
</s>
<s>
These	O
tools	O
are	O
generally	O
available	O
in	O
Clang/LLVM	O
and	O
GCC	B-Application
.	O
</s>
<s>
Similar	O
to	O
KASan	O
,	O
there	O
are	O
kernel-specific	O
versions	O
of	O
LSan	O
,	O
MSan	O
,	O
TSan	O
,	O
as	O
well	O
as	O
completely	O
original	O
kernel	B-Operating_System
sanitizers	O
such	O
as	O
KFENCE	O
and	O
KCSan	O
.	O
</s>
<s>
Additional	O
sanitizer	O
tools	O
(	O
grouped	O
by	O
compilers	B-Language
under	O
or	O
a	O
simiar	O
flag	O
)	O
include	O
:	O
</s>
<s>
One	O
common	O
way	O
to	O
use	O
a	O
sanitizer	O
is	O
to	O
combine	O
it	O
with	O
fuzzing	O
,	O
which	O
generates	O
inputs	O
likely	O
to	O
trigger	O
bugs	B-Error_Name
.	O
</s>
<s>
Chromium	B-Language
and	O
Firefox	B-Application
developers	O
are	O
active	O
users	O
of	O
AddressSanitizer	B-Application
;	O
the	O
tool	O
has	O
found	O
hundreds	O
of	O
bugs	B-Error_Name
in	O
these	O
web	O
browsers	O
.	O
</s>
<s>
A	O
number	O
of	O
bugs	B-Error_Name
were	O
found	O
in	O
FFmpeg	B-Library
and	O
FreeType	B-Application
.	O
</s>
<s>
The	O
Linux	B-Operating_System
kernel	I-Operating_System
has	O
enabled	O
the	O
AddressSanitizer	B-Application
for	O
the	O
x86-64	B-Device
architecture	O
as	O
of	O
Linux	B-Operating_System
version	O
4.0	O
.	O
</s>
