[Bug sanitizer/80114] New: asan-stack=1 with -fsanitize-address-use-after-scope and stack arrays multiplies code size
jani.nikula at intel dot com
gcc-bugzilla@gcc.gnu.org
Mon Mar 20 11:14:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80114
Bug ID: 80114
Summary: asan-stack=1 with -fsanitize-address-use-after-scope
and stack arrays multiplies code size
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: sanitizer
Assignee: unassigned at gcc dot gnu.org
Reporter: jani.nikula at intel dot com
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
Target Milestone: ---
Compiling
int main(void)
{
volatile int i = (const int []){0, 1, 2, 3, 4, 5}[1];
const int j = (const int []){0, 1, 2, 3, 4, 5}[i];
return j;
}
with --param asan-stack=1 and -fsanitize-address-use-after-scope doubles
generated code size. Compared to to the very tightly optimized non-asan code
size, this seems pretty bad. Is this to be expected?
Comparison: https://godbolt.org/g/hgS817
More information about the Gcc-bugs
mailing list