This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug sanitizer/83356] [7 Regression] excessive stack usage compiling with -O2 -fsanitize=bounds -fsanitize=object-size


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83356

--- Comment #5 from Arnd Bergmann <arnd at linaro dot org> ---
(In reply to Richard Biener from comment #3)

> That said, can't see an easy workaround but to change the source and/or
> not use -fsanitize= and expect decent code quality.

I don't see a good way to modify the source code without risking performance
regressions in other configurations (arch, compiler version or flags), and the
AES cipher is a rather performance critical part of the kernel.

I have experimentally shown that passing either -fno-tree-sra and/or
-fno-tree-pre improves the stack usage in this file significantly (312 bytes
with ubsan, 192 bytes without), though it's still around twice as much as with
gcc-7.1.1, both with and without sanitizers.

I have not yet tried to analyze or measure the resulting object code though.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]