[Bug sanitizer/80114] asan-stack=1 with -fsanitize-address-use-after-scope and stack arrays multiplies code size

2017-03-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80114 Martin Liška changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|---

[Bug sanitizer/80114] asan-stack=1 with -fsanitize-address-use-after-scope and stack arrays multiplies code size

2017-03-22 Thread jani.nikula at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80114 --- Comment #11 from Jani Nikula --- (In reply to Martin Liška from comment #10) > May I close this as worksforme? If the conclusion is that the magnitude of the code size bloat demonstrated in https://godbolt.org/g/hgS817 is expected, then go

[Bug sanitizer/80114] asan-stack=1 with -fsanitize-address-use-after-scope and stack arrays multiplies code size

2017-03-21 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80114 --- Comment #10 from Martin Liška --- May I close this as worksforme?

[Bug sanitizer/80114] asan-stack=1 with -fsanitize-address-use-after-scope and stack arrays multiplies code size

2017-03-20 Thread arnd at linaro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80114 --- Comment #9 from Arnd Bergmann --- Sent a kernel patch to avoid the problem: http://www.spinics.net/lists/intel-gfx/msg123586.html

[Bug sanitizer/80114] asan-stack=1 with -fsanitize-address-use-after-scope and stack arrays multiplies code size

2017-03-20 Thread arnd at linaro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80114 --- Comment #8 from Arnd Bergmann --- Looking at the kernel code again, I came up with an alternative that avoids the large stack size and produces good executable code in all configurations I found with the file that showed up a

[Bug sanitizer/80114] asan-stack=1 with -fsanitize-address-use-after-scope and stack arrays multiplies code size

2017-03-20 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80114 --- Comment #7 from joseph at codesourcery dot com --- "String literals, and compound literals with const-qualified types, need not designate distinct objects.". (This is different from named variables, which can't be merged without

[Bug sanitizer/80114] asan-stack=1 with -fsanitize-address-use-after-scope and stack arrays multiplies code size

2017-03-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80114 --- Comment #6 from Jakub Jelinek --- Sometimes it might be beneficial to use array in .rodata section rather than automatic compound literal, i.e. try const int j = ({ const int myarr[] = {0, 1, 2, 3, 4, 5}; myarr[i]; }); The question

[Bug sanitizer/80114] asan-stack=1 with -fsanitize-address-use-after-scope and stack arrays multiplies code size

2017-03-20 Thread jani.nikula at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80114 --- Comment #5 from Jani Nikula --- (In reply to Martin Liška from comment #4) > How common is such situation and why do you use volatile keyword in > combination with a constant index? I didn't write the sample, I think the goal of 'volatile'

[Bug sanitizer/80114] asan-stack=1 with -fsanitize-address-use-after-scope and stack arrays multiplies code size

2017-03-20 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80114 --- Comment #4 from Martin Liška --- (In reply to Jani Nikula from comment #3) > (In reply to Martin Liška from comment #2) > > Well, just adding the param and -fsanitize-address-use-after-scope does not > > enable any sanitization. One has to

[Bug sanitizer/80114] asan-stack=1 with -fsanitize-address-use-after-scope and stack arrays multiplies code size

2017-03-20 Thread jani.nikula at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80114 --- Comment #3 from Jani Nikula --- (In reply to Martin Liška from comment #2) > Well, just adding the param and -fsanitize-address-use-after-scope does not > enable any sanitization. One has to add -fsanitize=address to trigger real >

[Bug sanitizer/80114] asan-stack=1 with -fsanitize-address-use-after-scope and stack arrays multiplies code size

2017-03-20 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80114 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed|

[Bug sanitizer/80114] asan-stack=1 with -fsanitize-address-use-after-scope and stack arrays multiplies code size

2017-03-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80114 --- Comment #1 from Richard Biener --- I see, with -O2 and your options: main: .LFB0: .cfi_startproc movl$1, -4(%rsp) movslq -4(%rsp), %rax movl._1(,%rax,4), %eax ret which is the same as